Method and user interface for debugging an electronic system

ABSTRACT

Techniques and systems for analysis, diagnosis and debugging fabricated hardware designs at a Hardware Description Language (HDL) level are described. Although the hardware designs (which were designed in HDL) have been fabricated in integrated circuit products with limited input/output pins, the techniques and systems enable the hardware designs within the integrated circuit products to be comprehensively analyzed, diagnosed, and debugged at the HDL level at speed. The ability to debug hardware designs at the HDL level facilitates correction or adjustment of the HDL description of the hardware designs.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 10/210,509, filed Jul. 31, 2002 now U.S. Pat. No.6,823,497, entitled, “Method And User Interface For Debugging AnElectronic System”; which is a continuation-in-part of U.S. patentapplication Ser. No. 09/724,840, now U.S. Pat. No. 6,618,839 B1 filedNov. 28, 2000, entitled “Method and System For Debugging An ElectronicSystem With Enhanced Debugging Capabilities,” and which claims thebenefit of: (i) U.S. Provisional Patent application No. 60/168,266,filed Nov. 30, 1999, and entitled, “Interactive Debugging Of HDL SourceCode,” and (ii) U.S. Provisional Patent application No. 60/230,068,filed Aug. 31, 2000, and entitled “HDL-Based Hardware Debugging”.

This application also claims the benefit of: (i) U.S. Provisional PatentApplication No. 60/387,261 filed Jun. 7, 2002, and entitled “ENHANCEDHARDWARE DEBUGGING IN A HARDWARE DESCRIPTION LANGUAGE,” which is herebyincorporated by reference herein, and (ii) U.S. Provisional PatentApplication No. 60/360,627, filed Mar. 1, 2002, and entitled“HARDWARE-BASED HDL CODE COVERAGE AND DESIGN ANALYSIS,” which is herebyincorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to electronic systems and, moreparticularly, to debugging of electronic systems.

2. Description of the Related Art

Electronic systems are designed by designers to operate in specificways. Electronic systems are systems that contain digital and/or analogelectronic components connected together to perform specific operationsor functions. Besides the electronic components, electronic systems mayalso include software. Once designed, the electronic systems may need tobe debugged. Debugging electronic systems is a process which involvesdetection, diagnosis, and correction of functional failures. In thedetection step, the designer of the electronic system observes afunctional failure. When the designer is able to gather enoughinformation about the incorrect behavior of the electronic system, thedesigner of the electronic system can draw the necessary conclusions todiagnose the functional failure. For correction of the functionalfailure, a fix is applied and subsequently tested. When the design isprovided in a Hardware Description Language (HDL), such a fix may be atextual change to the HDL description of the electronic system.

In general, debugging has conventionally been performed by variousdifferent approaches. In particular, debugging has been performed bycomputer software debugging, hardware description language functionalverification, hardware logic level analysis, or hardware behavioralsource level emulation. These different approaches are discussed below.

Computer software debugging is conventionally performed using a computersoftware debugger. A computer software debugger is a software tool thatallows a software developer to control the execution of a runningcomputer software program by setting break-points, sequentiallysingle-stepping through the execution of the computer software program,and looking at the program's state by examining and displaying variablesand expressions. One example of such a software debugging tool is theGNU Debugger (GDB), which can be obtained from Red Hat, Inc. inSunnyvale, Calif.

Software debuggers usually offer interactive debugging of softwareprograms which are sequentially executed on computers. However, somesoftware debuggers also support limited concurrency such as threadedprogram execution. Some software debuggers support debugging programswritten at different levels of abstraction from high-level computerlanguages such as C++ down to assembler code and/or machine code. Toassist with debugging of programs written in high-level computerlanguages, the software debugging system can add extra debug information(e.g., symbolic names and references to source code) to the compiledcode during compilation of the computer software program. In combinationwith in-circuit emulators, software debuggers may provide a limitedcapability to analyze the underlying Central Processing Unit (CPU) ofthe computer executing the computer software program. A majordisadvantage of software debuggers is, however, that they cannot be usedfor efficiently debugging general hardware of electronic systems.

Hardware description language functional verification is used to verifythat the parts of an electronic system which are described using HDLmatch their functional specification. Such functional verification canbe achieved through functional simulation or formal verification.

Functional simulation is performed by a functional simulator. Afunctional simulator is a software program that runs on a host computerand simulates the operation of an electronic system using its HDLdescription. Examples of functional simulators include VCS and VSS fromSynopsys, Inc. in Mountain View, Calif., and ModelSim from MentorGraphics Corp. in Wilsonville, Oreg. To increase simulation performancesome functional simulators additionally make use of special purposehardware which acts as a co-processor and accelerates the simulation. Anexample of a hardware-accelerated functional simulator is the Hammersystem from Tharas Systems, Inc. in Santa Clara, Calif. Unfortunately,one major disadvantage of functional simulation is the need forsimulation models. In order to be able to simulate, there must exist asimulation model with the proper functional behavior for each componentof the HDL design for the electronic system. For some components suchsimulation models may not be readily available and must be generated.Additionally, the HDL design must be stimulated by a testbench. Sincethe ideal testbench must correctly and exhaustively match the behaviorof the target environment, creation of a testbench can be very difficultand time consuming. On the other hand, a testbench that is too simplewill not provide the necessary coverage to find all the design errors.Although functional simulation is useful, using functional simulation todebug design errors is too burdensome. Not only are the testbenchesdifficult to create, but also the more complex the HDL design is, thelower the performance of functional simulation. For state-of-the-art HDLdesigns simulation is now a million times slower than the fabricatedhardware. Hardware-acceleration can typically speedup functionalsimulation by a factor on the order of one-hundred. Accordingly, its lowperformance makes it impractical to use functional simulation either todebug real-time applications or to concurrently debug hardware andsoftware of complex electronic systems.

Formal verification is performed by a formal verification tool. Formalverification can help with the problem of incomplete coverage infunctional simulation due to testbench limitations. One approach checksthe HDL description for properties. Such properties may be explicitlyprovided by the designer of the electronic system or implicitlyextracted from the HDL description by the formal verification tool. Anexample of such a formal verification tool is Solidify from Averant,Inc. in Sunnyvale, Calif. One disadvantage of formal verification isthat it is impractical to use to re-produce functional failures observedin a running electronic system.

Both techniques, functional simulation and formal verification, have themajor disadvantage that they do not operate on fabricated hardware.Instead, both techniques operate on a model of the electronic system anda model of the environment in which the electronic system runs, i.e., atestbench. Thus, their use is limited to debugging design errors. Assuch, neither technique is applicable for debugging manufacturingfaults, environment errors, timing errors and/or tool errors. Also,inadequacies in the testbench have the potential to hide or introducedesign errors in the HDL design during functional simulation which canlater, when the HDL design is fabricated, show up as functional failuresof the running electronic system.

Hardware logic level analysis is a technique that works at the logiclevel of a fabricated electronic system. The logic level of abstractionis also referred to as gate-level. Since electronic systems have beendesigned at the logic level for many years (for example using schematicentry of logic gates and flip-flops), there exists a wide variety ofdifferent techniques for debugging at logic level, including: digitallogic analyzers, in-circuit emulators, Design-For-Test (DFT) techniques,and hardware emulation, each of these different techniques are discussedbelow.

Digital logic analyzers operate to probe a limited number of digitalsignals and record their logic values. Probing is accomplished byphysically connecting probes of the digital logic analyzer to exposedpins and/or circuitry on the fabricated design. Recording is controlledby trigger conditions, which are conditional expressions built upon thevalues of the recorded signals provided by the probes. The values forthe recorded signals are stored in dedicated memory inside the digitallogic analyzer so as to be available for subsequent display. Digitallogic analyzers can be external devices or blocks embedded inside thedigital circuits of an electronic system. An example of an externaldigital logic analyzer is the Agilent 16715A from Agilent Technologies,Inc. in Palo Alto, Calif. Examples of embedded logic analyzers areSignalTap from Altera Corporation in San Jose, Calif., or ChipScope fromXilinx, Inc. in San Jose, Calif. Another example of an embedded logicanalyzer was presented at the 1999 IEEE International Test Conference byBulent Dervisoglu in “Design for Testability: It is time to deliver itfor Time-to-Market”. Since embedded logic analyzers are added to thecircuitry of the design, they can probe internal signals. Thus, embeddeddigital logic analyzers overcome the limited access to internal signalsproblem of external logic analyzers because access to the internalsignals is not restricted by the pins of the fabricated circuits.

An in-circuit emulator is a specialized piece of hardware that connectsto a CPU for debugging the CPU and the software that runs on the CPU. Anexample of an in-circuit emulator is visionICE from Windriver inAlameda, Calif. However, since in-circuit emulators only work for thespecific target CPU for which they were built, in-circuit emulators areinappropriate for debugging general digital circuits.

DFT techniques, such as boundary scan and built-in self test, provideaccess to the internal registers of a running fabricated digitalcircuit. An example of such technique is described in the IEEE 1149.1JTAG standard available from the Institute of Electrical and ElectronicEngineers in Piscataway, N.J. DFT techniques are also described in“Digital Logic Testing and Simulation” by Alexander Miczo, published byWiley, John and Sons Inc., 1985. DFT techniques were originallydeveloped for and applied to testing of manufacturing faults and havethe major disadvantage that they do not relate back to the HDLdescription.

Hardware emulation systems map a synthesized HDL design onto specialemulation hardware. Such emulation hardware comprises manyre-programmable FPGA devices and/or special purpose processors. Theemulation hardware then executes a model of the HDL design. Thushardware emulation has the same disadvantage as functional simulation,namely, that it works on a model of the electronic system and not on thefabricated hardware. As a result, hardware emulation systems are limitedto design error debugging, and cannot be used for diagnosingmanufacturing faults, tool errors, timing errors, etc. An example ofsuch a hardware emulation system is System Realizer from QuickturnSystems, in San Jose, Calif. Specially built prototyping systemscomprising FPGAs/PLDs can also be seen as hardware emulation systems.Since hardware emulation is usually much faster than functionalsimulation, hardware emulation systems may enable use of the softwarethat is supposed to run on the HDL design to be used as a testbench.Even so, hardware emulation typically runs at speeds below one MegaHertz(MHz) while the HDL design is supposed to run at many hundred MegaHertz.In some cases the emulator speed may allow the user to connect the HDLdesign to the target environment which makes the design of testbenchesunnecessary. Even so, with the high speeds of state-of-the-art HDLdesigns, hardware emulation is not capable of debugging the majority ofreal-time applications. Another disadvantage is that the specialsynthesis, mapping, and multi-chip partitioning steps required to bringan HDL design into a hardware emulation system are very complicated andtime consuming.

A major drawback of all logic level debugging techniques is that theywork at the logic level of abstraction. Since the HDL-based designmethodology of electronic systems is much more efficient for todayscomplex designs, HDL designs have largely replaced logic level designs.Application of logic level debugging techniques to HDL designmethodology is highly inefficient. Since logic level debugging does notrelate back to the HDL description, it normally would not provide thedesigner of the electronic system with sufficient information tocorrectly diagnose a functional failure.

Hardware behavioral source level emulation provides hardware emulationof source level designs. One technique for debugging HDL designsdescribed at the behavioral level HDL using hardware emulation isdescribed in “Interaktives Debugging algorithmischerHardware-Verhaltensbeschreibungen mit Emulation” by Gernot H. Koch,Shaker Verlag, Germany, 1998. Some of which is also described in Koch etal., “Breakpoints and Breakpoint Detection in Source Level Emulation,”ACM Transactions on Design Automation of Electronic Systems, Vol. 3, No.2, 1998. The therein described technique is referred to as Source LevelEmulation (SLE) and offers an approach for emulating HDL designs,however only if such designs are described in behavioral VHDL. Duringbehavioral synthesis a behavioral HDL design is enhanced for debuggingby generating and adding additional circuitry for break-point detection.The behavioral synthesis tool writes out synthesized VHDL which containsa register transfer level description of the enhanced HDL design. Theregister transfer level description is then synthesized, mapped, andmulti-chip partitioned into the emulation hardware. During hardwareemulation with a hardware model of the HDL design, the user is able toexamine particular variables in the behavioral HDL description.

Control is provided via break-points which are detected using theadditional circuitry inside the running hardware model. Break-points inSLE have a very specific meaning. In particular, such break-points areclosely tied to behavioral operations in the data-flow of the behavioralHDL description, and are associated with particular states of acontroller which is generated by the behavioral synthesis. Additionally,break-points can be made conditioned upon particular values of data-pathregisters. When a break-point is detected, the execution of the hardwaremodel is stopped. This is done by halting some or all of the systemclocks and prevents the registers from changing their current values.Once halted, internal registers can be read. These registers form ascan-chain such that their values can be read by an emulation debuggingtool.

Examination of variables in the behavioral HDL description is done intwo ways. For variables which are mapped by the behavioral synthesisinto registers in the hardware model, their values can be read andrelated back to HDL identifiers. This is done using map files which keeptrack of the transformations in behavioral synthesis, register transferlevel synthesis, mapping, and multi-chip partitioning. For variableswhich have not been mapped to registers in the hardware model, theirvalues are computed using a functional model of the behavioral HDLdesign. This functional model is created during behavioral synthesis andrequires the existence of functional models of its components. Thevalues, either read or computed, are then displayed in the behavioralHDL description. Optionally, by overwriting some or all of the registersof the hardware model while the hardware model is halted, the behaviorof the HDL design can be modified once the execution of the hardwaremodel is resumed.

Although source level emulation provides a debugging method which worksat the level of the HDL description (in this case behavioral VHDL), ithas various drawbacks which limits its use in practice. Several of thedrawbacks are as follows. First, enhancements for source level emulationmust be done inside a behavioral synthesis tool, since it needs specialinformation about the behavioral HDL design which is only availableduring the behavioral synthesis process. Second, source level emulationdoes not allow the designer to perform customization. For example, adesigner is not able to select trade-offs between hardware overhead anddebugging support. Third, source level emulation cannot handle HDLdescriptions on levels of abstraction other than the one provided bybehavioral VHDL. Explicitly, source level emulation is not applicablefor the most commonly used levels of abstraction of RTL HDL andgate-level HDL. Fourth, source level emulation supports neitherhierarchy nor re-use of pre-designed blocks. Fifth, there are variouslimitations and difficulties in relating registers back to behavioralHDL source code. Sixth, in order to examine the state of the hardwaremodel, it is required that some or all of the system clocks be haltedand the hardware stopped, which makes source level emulationinapplicable for debugging the majority of today's electronic systemswhich are not to be stopped.

Thus, there is a need for efficient and effective approaches fordebugging HDL-based electronic system designs.

SUMMARY OF THE INVENTION

Broadly speaking, the invention relates to techniques and systems foranalysis, diagnosis and debugging fabricated hardware designs at aHardware Description Language (HDL) level. Although the hardware designs(which were designed in HDL) have been fabricated in integrated circuitproducts with limited input/output pins, the invention enables thehardware designs within the integrated circuit products to becomprehensively analyzed, diagnosed, and debugged at the HDL level atspeed. The ability to debug hardware designs at the HDL levelfacilitates correction or adjustment of the HDL description of thehardware designs.

The invention can be implemented in numerous ways including, a method,system, device, graphical user interface and computer readable medium.Several embodiments of the invention are discussed below.

As a method for facilitating debugging of a fabricated integratedcircuit, one embodiment of the invention includes at least the acts of:receiving a high level hardware description language (HDL) descriptionor a representation derived therefrom for electronic circuitry to beproduced within the fabricated integrated circuit; displaying the highlevel HDL description for the electronic circuitry on a display deviceassociated with a user; determining aspects of the electronic circuitryto be examined or modified during debugging of the fabricated integratedcircuit, such determining operates to determine the aspects of theelectronic circuitry through selections made with respect to the highlevel HDL description for the electronic circuitry; displaying, on thedisplay device, a visual indication of the selections that have beenmade with respect to the high level HDL description for the electroniccircuitry; determining design instrumentation circuitry based on theaspects of the electronic circuitry determined to be examined ormodified; and incorporating the design instrumentation circuitry intothe electronic circuitry, thereby facilitating debugging of thefabricated integrated circuit.

As a graphical user interface for instrumenting or debugging anelectronic system design, one embodiment of the invention includes atleast: a hardware description language (HDL) code pane that displays HDLcode describing the electronic system design; and a design navigationpane that displays a navigable, hierarchical description of theelectronic system design.

As a computer readable medium including at least computer program codefor facilitating debugging of a fabricated integrated circuit, oneembodiment of the invention includes at least: computer program code forreceiving a high level hardware description language (HDL) descriptionor a representation derived therefrom for electronic circuitry to beproduced within the fabricated integrated circuit; computer program codefor displaying the high level HDL description for the electroniccircuitry associated with a user; computer program code for determiningaspects of the electronic circuitry to be examined or modified duringdebugging of the fabricated integrated circuit, the aspects of theelectronic circuitry being determined through selections made withrespect to the high level HDL description for the electronic circuitry;computer program code for displaying a visual indication of theselections that have been made with respect to the high level HDLdescription for the electronic circuitry; computer program code fordetermining design instrumentation circuitry based on the aspects of theelectronic circuitry determined to be examined or modified; and computerprogram code for incorporating the design instrumentation circuitry intothe electronic circuitry, thereby facilitating debugging of thefabricated integrated circuit.

Other aspects and advantages of the invention will become apparent fromthe following detailed description taken in conjunction with theaccompanying drawings which illustrate, by way of example, theprinciples of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be readily understood by the following detaileddescription in conjunction with the accompanying drawings, wherein likereference numerals designate like structural elements, and in which:

FIG. 1A is a block diagram of a hardware debugging system according toone embodiment of the invention.

FIG. 1B is a block diagram of a hardware debugging system according toanother embodiment of the invention.

FIG. 2 is a flow diagram of basic instrumentation processing accordingto one embodiment of the invention.

FIG. 3 is a block diagram of an instrumentation system according to oneembodiment of the invention.

FIGS. 4A and 4B are flow diagrams of detailed design instrumentationprocessing according to one embodiment of the invention.

FIG. 5A is a flow diagram of selection processing according to oneembodiment of the invention.

FIG. 5B is a flow diagram of break-point processing according to oneembodiment of the invention.

FIG. 5C is a flow diagram of explicit trigger condition selectionprocessing according to one embodiment of the invention.

FIG. 5D is a flow diagram of sampling signal selection processingaccording to one embodiment of the invention.

FIG. 6 is a diagram of a design instrumentation database according toone embodiment of the invention.

FIG. 7A is a block diagram of an instrumentation system according to oneembodiment of the invention.

FIG. 7B is a diagram of a hard block resolution system according to oneembodiment of the invention.

FIG. 8 is a block diagram of a representative Design InstrumentationCircuit (DIC) according to one embodiment of the invention.

FIG. 9 describes a representative generic configurable circuitry whichcan implement design sampling and design patching according to oneembodiment of the invention.

FIG. 10 illustrates a representative generic configurable triggerdetection circuit according to one embodiment of the invention.

FIG. 11 illustrates a representative state based Finite State Machinedesign control circuit according to one embodiment of the invention.

FIG. 12 illustrates a representative transition based Finite StateMachine design control circuit according to one embodiment of theinvention.

FIG. 13 illustrates a representative data-path register design controlcircuit according to one embodiment of the invention.

FIG. 14 illustrates a representative part of the design control circuitaccording to one embodiment of the invention.

FIG. 15 is a block diagram of a portion of an instrumentation systemwhich includes a cross-reference analysis module and a cross-referencedatabase according to one embodiment of the invention.

FIG. 16 is a block diagram of a portion of an instrumentation systemwhich includes a DFT analysis module according to one embodiment of theinvention.

FIG. 17 is a data flow diagram illustrating DIC creation processingaccording to one embodiment of the invention.

FIG. 18 is a flow diagram of HDL-based hardware debugging processingaccording to one embodiment of the invention.

FIGS. 19-1 and 19-2 illustrate a data flow diagram of a debuggingprocess performed by a HDL-based hardware debugger according to oneembodiment of the invention.

FIG. 20 is a block diagram of a hardware/software co-debugging systemaccording to one embodiment of the invention.

FIG. 21 is a block diagram of a hardware/software co-debugging systemaccording to one embodiment of the invention.

FIG. 22 is a flow diagram of a design instrumentation user interfaceaccording to one embodiment of the invention. FIG. 23 is a flow diagramof a HDL-based hardware debugger user interface according to oneembodiment of the invention.

FIG. 24 is a block diagram of resource sharing in design instrumentationcircuitry according to one embodiment of the invention.

FIG. 25 is a block diagram of a JTAG chain of multiple instances ofdesign instrumentation circuitry according to one embodiment of theinvention.

FIG. 26 is a flow diagram a HDL-based hardware debugging methodaccording to one embodiment of the invention.

FIG. 27 is a flow diagram of a HDL-based hardware debugging method inconjunction with multi-chip partitioning according to one embodiment ofthe invention.

FIG. 28 is a flow diagram of a HDL-based hardware debugging method inconjunction with multi-chip partitioning according to one embodiment ofthe invention.

FIG. 29 is a screen-shot of a design instrumentation graphical userinterface showing a tagged HDL source file according to one embodimentof the invention.

FIG. 30 is a screen-shot of a design instrumentation graphical userinterface showing selected HDL source file tags according to oneembodiment of the invention.

FIG. 31 is a screen-shot of a design instrumentation graphical userinterface showing additional selections of HDL source file tagsaccording to one embodiment of the invention.

FIG. 32 is a screen-shot of a design instrumentation graphical userinterface showing additional selections of HDL source file tagsaccording to one embodiment of the invention.

FIG. 33 is a screen-shot of a design instrumentation graphical userinterface showing HDL source file tags of selected break-pointsaccording to one embodiment of the invention.

FIG. 34 is a screen-shot of a design instrumentation graphical userinterface showing HDL source file tags of additional selectedbreak-points according to one embodiment of the invention.

FIG. 35 is a screen-shot of a design instrumentation graphical userinterface showing a selection menu for HDL source files according to oneembodiment of the invention.

FIG. 36 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing HDL source file tags of design instrumentationaccording to one embodiment of the invention.

FIG. 37 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing activated HDL source file tags according to oneembodiment of the invention.

FIG. 38 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing HDL source file tags of back-annotated sampledata according to one embodiment of the invention.

FIG. 39 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing a menu for entering watch-points according to oneembodiment of the invention.

FIG. 40 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing a watch-point menu according to one embodiment ofthe invention.

FIG. 41 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing an activated watch-point according to oneembodiment of the invention.

FIG. 42 is a screen-shot of a HDL-based hardware debugging graphicaluser interface showing HDL source file tags of back-annotated sampledata according to one embodiment of the invention.

FIG. 43 is a block diagram of design instrumentation circuitry for a HDLdesign that contains folded hierarchy.

FIGS. 44-1, 44-2 and 44-3 are exemplary VHDL designs that contain foldedhierarchy.

FIGS. 45-1, 45-2 and 45-3 are instrumented and annotated versions of theexemplary VHDL designs that contain folded hierarchy.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates to techniques and systems for analysis,diagnosis and debugging fabricated hardware designs at a HardwareDescription Language (HDL) level. Although the hardware designs (whichwere designed in HDL) have been fabricated in integrated circuitproducts with limited input/output pins, the invention enables thehardware designs within the integrated circuit products to becomprehensively analyzed, diagnosed, and debugged at the HDL level atspeed. The ability to debug hardware designs at the HDL levelfacilitates correction or adjustment to the HDL of the hardware designs.

The following discussions will be made clearer by a brief review of therelevant terminology as it is typically (but not exclusively) used.Accordingly, to assist readers in understanding the terminology usedherein, the following definitions are provided.

“Software” is defined as but not limited to programming language contentwritten using a programming language. Examples of programming languagesinclude C, C++, Basic, assembly, and Java.

“HDL” is a Hardware Description Language. A hardware descriptionlanguage is defined as any programming language that can describe thehardware portion of an electronic system. Examples of HDLs include VHDLwhich is described in the IEEE Standard VHDL Language Reference Manualavailable from the Institute of Electrical and Electronic Engineers inPiscataway, N.J., which is hereby incorporated by reference; Verilog HDLwhich is described in Hardware Modeling with Verilog HDL by EliezerSternheim, Rajvir Singh, and Yatin Trivedi, published by AutomataPublishing Company, Palo Alto, Calif., 1990, which is herebyincorporated by reference; the various extensions of Verilog HDL, forexample, OVL or SystemVerilog as, for example, described in“SystemVerilog 3.0—Accellera's Extensions to Verilog”, both published bythe Accellera Organization, Inc. in Napa Calif.; the SuperLog languagefrom Co-Design Automation in Los Altos, Calif.; the Sugar verificationlanguage, originally developed by IBM Haifa Research Lab, Haifa, Israel;the “e” Verification Language from Verisity, Inc. in Mountain View,Calif.; and SystemC which stems from the Open SystemC Initiative (OSCI)originally started by Synopsys, Inc. of Mountain View, Calif. Generalpurpose programming languages such as JAVA, C++, C, and assemblylanguages may also be used as a HDL.

A “high level HDL description” is a HDL description in which at least aportion of the description is at register transfer level (RTL) orhigher. For VHDL this synthesizable, register transfer level subset isdescribed in the IEEE 1076.6-1999 Standard for VHDL Register TransferLevel (RTL) Synthesis, available from the Institute of Electrical andElectronic Engineers in Piscataway, N.J., which is hereby incorporatedby reference. The synthesizable register transfer level subset of theVerilog HDL is described in “Verilog HDL: A Guide to Digital Design andSynthesis” by Samir Palnitkar, SunSoft Press, 1996.

A “RAM” is a Random Access Memory—defined as an electronic componentcapable of storing data.

“ASIC” is an Application Specific Integrated Circuit. An ASIC device isan electronic component of a system. ASICs are custom devices createdfor a specific purpose within the electronic system. ASIC devices areeasier and faster to create with respect to a full custom semiconductordevice. An ASIC may be described using HDL and implemented usingsynthesis.

An “FPGA” is a Field Programmable Gate Array. FPGAs are electroniccomponents that have a configurable function. These devices are able tochange their functionality via an information stream transferred to thedevice. These electronic components are available from a number ofdifferent suppliers in a wide range of sizes and speeds. One example ofthese devices are the Virtex FPGA devices from Xilinx, Inc. located inSan Jose, Calif. An FPGA design may be described using HDL andimplemented using synthesis.

A “Central Processing Unit” or “CPU” is circuitry controlling theinterpretation and execution of software programmed instructions,performs arithmetic and logical operations on data, and controlsinput/output functions. For the following descriptions the term CPU willbe used to also denote other processing elements such asmicroprocessors, digital signal processors, microcontrollers, etc.

A “register” is an element in digital circuitry which can store one ormore bits. Examples for registers are the various types of flip-flopsand latches.

A “PLD” is an Programmable Logic Device. PLDs are electronic componentsthat have a configurable function. These devices are able to changetheir functionality via an information stream transferred to the device.These electronic components are available from a number of differentsuppliers in a wide range of sizes and speeds. One example of thesedevices are the Apex PLD devices from Altera Corporation in San Jose,Calif. A PLD design may be described using HDL and implemented usingsynthesis.

“Electronic Components” are defined as but not limited to, transistors,logic gates, integrated circuits, semi-custom integrated circuits, fullcustom integrated circuits, application specific integrated circuits(ASICs), gate arrays, programmable logic devices (PLDs), fieldprogrammable gate arrays (FPGAs), CPUs, Random Access Memory (RAM),mixed signal integrated circuits, systems on a chip (SOC), and systemson a printed circuit board.

An “Electronic System” is defined as a system that contains one or moredigital and/or analog Electronic Components connected together toperform specific operations or functions. An Electronic System can beimplemented entirely of hardware (Electronic Components) or consist of amix of hardware and software (programming language content).

“Mixed-signal designs” are defined as Electronic System designs whichincorporate both digital and analog signals.

The “HDL Design” is referred to as the portion of the electronic systemwhich is described in HDL and implemented in hardware. It is alsoreferred to as the “Design under Test” (DUT).

An “SOC” is a System On Chip. A SOC is defined as a device large enoughto contain an entire electronic system implementation. SOC devices canintegrate a number of electronic devices into one device.

An “HDL description” is the textual description of an HDL Design.

“HDL source code” is referring to the text files which contain the HDLdescription.

An “HDL identifier” is an object in an HDL description which representsa signal, a set of signals, a storage element, or a set of storageelements and which can take a value from a set of possible values. EachHDL identifier is associated with a particular scope defined by thesyntax of the underlying hardware description language.

A “Technology Mapping Process” is defined as the process of transforminga particular representation of an electronic design into a designconsisting entirely of primitive electronic elements from a designlibrary for a target technology. The representation of said electronicdesign from which the Technology Mapping Process begins is dependent onthe particular Technology Mapping Process being employed. However, saidrepresentation usually consists of simple boolean elements. For example,said representation may consist entirely of an interconnected set of2-input/1-output logic elements with each said element performing theNAND function. An example of a tool that performs the Technology MappingProcess is Design Compiler from Synopsys, Inc. in Mountain View, Calif.

“Synthesis” is defined as the process of creating an electronicimplementation from the functional description of a system. An exampleof a tool that performs this operation is Design Compiler from Synopsysin Mountain View, Calif. which reads electronic system descriptionswritten in a synthesizable subset of VHDL and Verilog and produces atechnology mapped design as an output.

“Behavioral HDL” is an HDL description at an algorithmic level ofabstraction in which neither the timing behavior nor the structure ofthe HDL Design is explicitly described.

“Behavioral synthesis” transforms a behavioral HDL description into aregister transfer level (RTL) description where the timing behavior andthe structure of the HDL Design is fixed. This RTL description is thenprocessed in synthesis and technology mapping. An example of a tool thatperforms behavioral synthesis is Behavioral Compiler from Synopsys, Inc.of Mountain View, Calif.

A “System Clock” is defined as a main timekeeping signal in a design.All operations that are relative to the System Clock will proceed whenthe System Clock becomes active.

“Constraints” are defined as limits placed on parameters for theimplementation of an electronic system. Parameters of an electronicsystem can include but are not limited to register to registerpropagation delay, system clock frequency, primitive element count, andpower consumption. These constraints can be used by synthesis tools toguide the implementation of the electronic design.

“Fabrication” is the process of transforming a synthesized andtechnology mapped design into one or more devices of the targettechnology. For example, the fabrication of ASICs involves manufacturingand the fabrication of FPGAs and PLDs involves device configuration.

“DFT” is Design-for-test. DFT is defined as a process in which anelectronic system designer will include structures in the electronicsystem that facilitates manufacturing testing.

“Design Rule Check” (DRC) are checks performed before integrated circuitmanufacturing to ensure that in the placed and routed technology mappeddesign none of the rules of the target technology process is violated.Examples for such DRC are checks for shorts, spacing violations, orother design-rule problems between logic cells. An example for a toolthat does DRC is Dracula from Cadence Design Systems, Inc. in San Jose,Calif.

A “Functional Specification” is defined as the documentation thatdescribes the necessary features and operations of a system.

A “functional failure” is a behavior of a design which does not meet thefunctional specification which was used in the creation of the design.Every step in the design process can potentially cause a functionalfailure. Functional failures can be classified depending on which stepof the design process caused the functional failure.

A “fault” is a specific type of functional failure. This type of failureis due to one or more manufacturing defects causing a functional failurein the fabricated design.

A “design error” is a specific type of functional failure where the HDLdescription's behavior did not match the functional specification.

A “tool error” is a specific type of functional failure which wasintroduced by design tools because the HDL description was not properlyprocessed such that the functional specification is not met by theimplementation.

An “environment error” is a specific type of functional failure causedby a particular combination of environmental parameters such astemperature, humidity, pressure, etc.

A “Functional Simulator” is a tool that mimics the functional behaviorof a model of an electronic system which is described using HDL.

A “Testbench” is defined as an electronic system description thatpresents stimulus to and/or gathers information from the targetelectronic system design to be verified. In some cases the testbenchignores the response from the target electronic system design. Atestbench is used to mimic the behavior of the target environment inwhich the electronic system being developed will operate. A testbenchmay comprise both hardware and software.

A “Target Environment” is the system the electronic system is specifiedto interact with and/or to run in. A target environment may compriseboth hardware and software.

The “Target Speed” of an electronic system is the speed and/or the speedrange the electronic system is specified to run at. Examples formeasures for the target speed and the speed range are clock frequency,response time, time to propagate, and cycle time.

“Debugging” is the process of comparing the behavior of animplementation of the electronic system to the electronic systemfunctional specification. The purpose of debugging is to find causes andremedies for functional failures.

“Co-Debugging” or “hardware/software co-debugging” is defined as theprocess of debugging the software and hardware of an electronic systemconcurrently.

A “FSM” is Finite State Machine—defined as an electronic system controlstructure. The design and implementation of FSM is described in greatdetail in Synthesis and Optimization of Digital Circuits, by GiovanniDeMicheli, McGraw Hill, 1994.

A “HDL Building Block” is a functional unit of an HDL Design from whichthe HDL Design is constructed. A HDL Building Block (BB) performscalculations on the signals to which it is connected and communicateswith other BBs in the design. The communication is through connectinginternal signals of a BB to communication ports of the BB and/orconnecting internal signals of the BB to communication ports of otherBBs in the HDL Design. Examples of BBs are Entities in the VHDL languageand Modules in the Verilog language.

A “Hard Block” is an electronic system which has a pre-definedfunctionality and which can be incorporated into another electronicsystem. Commonly, the form of the Hard Block is such that thefunctionality of the Hard Block can not be altered. An example of a hardblock is an HDL Design which implements a industry standard buscontroller.

A “Design State” is defined as the logical values taken by the storageelements of the design at a particular time, combined with the logicalvalues taken by the inputs of the design taken at the same particulartime.

The “System State” or “State of the System” is a synonym for “DesignState.”

“Real-time” means a task, process or response occurs substantiallyimmediately. The term is used to describe a number of different computerfeatures. For example, real-time operating systems are systems thatrespond to input immediately. Real-time is also used for describingtasks in which the computer must react to a steady flow of newinformation without interruption. Real-time can also refer to eventssimulated by a computer at the same speed that they would occur in reallife.

Embodiments of this aspect of the invention are discussed below withreference to FIGS. 1A-45-3. However, those skilled in the art willreadily appreciate that the detailed description given herein withrespect to these figures is for explanatory purposes as the inventionextends beyond these limited embodiments.

FIG. 1A is a block diagram of a hardware debugging system 100 accordingto one embodiment of the invention. The hardware debugging system 100operates to debug a hardware product referred to herein as a DeviceUnder Test (DUT) 102. The DUT 102 is typically part of a larger hardwareproduct referred to as an electronic system 104. The DUT 102 can pertainto a single integrated circuit chip, multiple integrated circuit chips,a system on a chip, or a system on a printed circuit board.

According to the invention, the DUT 102 includes Design InstrumentationCircuitry (DIC) 106. The DIC 106 is provided within the DUT 102 in orderto facilitate debugging of the DUT 102. The DIC 106 can be providedwithin the DUT 106 in either a centralized or distributed manner.

The hardware debugging system 100 operates to determine the DIC 106 thatis provided within the DUT 102. In this regard, an original HDLdescription 108 of the electronic system 104 is received at aninstrumentor 110. The instrumentor 110 modifies or alters the originalHDL description 108 to produce an instrumented HDL description 112. Theinstrumented HDL description 112 represents not only the electronicsystem 104 with the DUT 102 provided therein, but also the DIC 106 thatis provided within the DUT 102. The instrumentor 110 also stores DICinformation to a design instrumentation database 114. By storing the DICinformation in the design instrumentation database 114, thehardware-based debugging of the DUT 102 is facilitated.

The hardware debugging system 100 also includes synthesis andplace&route systems 116. The synthesis and place&route systems 116receives the instrumented HDL description 112 and performs conventionalsynthesis as well as place&route operations in order to produce aninstrumented design 118. Although not shown in FIG. 1A, other additionaltools can be utilized to produce or enhance the instrumented design 118.Examples of additional tools include a Design-For-Test (DFT) tool or aDesign Rule Check (DRC) tool. The instrumented design 118 represents adescription (e.g., design files) of the electronic system 104 that wouldbe thereafter fabricated. Hence, once the instrumented design 118 isavailable, fabrication 120 can be performed. The fabrication 120produces the electronic system 104 having the DUT 102 with the DIC 106provided therein. Fabrication is the process of transforming asynthesized and technology mapped design (e.g., the instrumented design118) into one or more devices of the target technology. For example, ifthe target technology is Application Specific Integrated Circuits(ASICs) then the fabrication involves manufacturing, and if the targettechnology is Field Programmable Gate Arrays (FPGAs) or ProgrammableLogic Devices (PLDs) the fabrication involves device configuration.

At this point, the electronic system 104 is a hardware product that hasbeen produced. This hardware product can then be debugged using aHDL-based hardware debugger 122. More particularly, the HDL-basedhardware debugger 122 couples to the DIC 106 so that it is able tocommunicate with the DIC 106 when debugging the DUT 102. The HDL-basedhardware debugger 122 also couples to the design instrumentationdatabase 114 so that access to the DIC information is available. As aresult, the HDL-based hardware debugger 122 enables a user to debug theDUT 102 and/or hardware and/or software interacting with the DUT 102 inclose relation to the original HDL description 108. Further, in oneembodiment, debugging can be performed while the electronic system 104and the DUT 102 operate in the target environment, at target speed.

FIG. 1B is a block diagram of a hardware debugging system 150 accordingto another embodiment of the invention. The hardware debugging system150 is similar to the hardware debugging system 100 and includes many ofthe same components. Hence, the hardware debugging system 150 enables auser of the HDL-based hardware debugger 122 to debug the DUT 102 of theelectronic system 104 and/or hardware and/or software interacting withthe DUT 102, as noted above. However, the hardware debugging system 150includes a synthesis and place&route system 152 that includes aninstrumentor 154. Hence, the original HDL description 108 is supplied tothe synthesis and place&route system 152. The synthesis and place&routesystem 152 can then produce the instrumented design 118 while using notonly synthesis and place&route tools but also the instrumentor 154. Inthis embodiment, the instrumentor 154 is able to be embedded withinsynthesis and place&route system 152. Here, the instrumentor 154 assistswith producing the instrumented design 118 which represents theelectronic system 104 having the DIC 106 provided within the DUT 102.However, with the hardware debugging system 150, the original HDLdescription 108 need not be modified to produce an instrumented HDLdescription.

FIG. 2 is a flow diagram of basic instrumentation processing 200according to one embodiment of the invention. The basic instrumentationprocessing 200 is, for example, performed by the instrumentor 110illustrated in FIG. 1A or the instrumentor 154 illustrated in FIG. 1B.

The basic instrumentation processing 200 initially receives 202 a HDLdescription for an electronic system. The HDL description is thenanalyzed 203 to understand the characteristics of the electronic system.Next, parts (or portions) of the electronic system that are to beexamined and/or modified are determined 204. Typically, the parts of theelectronic system to be examined and/or modified (e.g., instrumented)are within a DUT such as the DUT 102 illustrated in FIGS. 1A and 1B.Hence, the parts of the electronic system to be examined and/or modifiedrepresent various signals and/or components within the DUT. After theparts of the electronic system to be examined and/or modified have beendetermined 204, design instrumentation circuitry (DIC) is generated 206.Preferably, the DIC is determined 204 based on the parts of theelectronic system to be examined and/or modified. In this regard, theDIC can be at least partially customized to the application such as theamount or degree of testing or debugging desired. Thereafter, the DIC isincorporated 208 into the electronic system. The DIC can be incorporated208 into the electronic system (namely, the DUT) in various ways. In oneembodiment, the DIC can be incorporated by adding HDL to the originalHDL for the electronic system. In another embodiment, the DIC can beincorporated by modifying a netlist description for the electronicsystem. Following the operation 208, the basic instrumentationprocessing 200 is complete and ends.

Design instrumentation (DI) is a process by which a HDL description ofan electronic system is analyzed, and then a DIC computed. The DIC isthereafter incorporated (e.g., added) into the electronic system tofacilitate debugging. The DIC can be added to the electronic system in avariety of ways. In one embodiment, DIC can be added to the electronicsystem by adding an HDL description of the DIC to the HDL description ofthe electronic system. In another embodiment, the DIC can be added tothe electronic system during synthesis. The DIC provides mechanisms tocontrol the examination and/or modification of a running electronicsystem. Thus, the DIC allows a system to analyze, diagnose, and/or debugthe DUT by giving detailed and accurate information about its currentstate of operation, as well as the state history.

FIG. 3 is a block diagram of an instrumentation system 300 according toone embodiment of the invention. The instrumentation system 300 operatesto perform design instrumentation operations to produce an appropriateDIC.

The instrumentation system 300 includes an instrumentor 302. Theinstrumentor 302 operates to determine the appropriate DIC for theelectronic system (namely, the DUT) that is to be eventually hardwaredebugged. The instrumentor 302 receives an original HDL description 304as well as instrumentation directives 306. The instrumentationdirectives 306 are instructions to the instrumentor 302 that inform theinstrumentor 302 of the portions, parts or areas of the original HDLdescription 304 that are to be examined and/or modified. Theinstrumentation directives 306 can be predetermined or interactivelyprovided by a user through a user interface. Additionally, theinstrumentor 302 can further receive design constraints 308, Design ForTest (DFT) information 310, instrumented pre-designed blocks 312 and DICtemplate(s) 314.

The design constraints 308 are constraints on the particular designassociated with the original HDL description 304. More particularly,design constraints are limits placed on parameters for an implementationof an electronic system. Some examples of the parameters that can belimited by design constraints include register-to-register propagationdelay, system clock frequency, primitive element count, and powerconsumption. The constraints on the parameters are used by synthesis andplace&route tools to guide the implementation of the electronic design.

The DFT information 310 is information about features (e.g., structures)of the original HDL description 304 that pertain to testing. The DFTinformation 310 is used to facilitate manufacturing testing. Forexample, the DFT information 310 can provide a description of ascan-chain provided within the original HDL description 304. Theinstrumentor 302 can utilize portions of the DFT information 310 toreduce the circuitry required for the DIC.

The DIC can make use of previously instrumented pre-designed blocks 312.In case the electronic system contains pre-designed blocks which havebeen instrumented, the DIC can communicate with the previouslyinstrumented pre-designed blocks 312 to facilitate their debugging. TheDIC template(s) 314 provide one or more templates for the instrumentor302 to utilize when producing the DIC.

The instrumentor 302 outputs an instrumented description 316. In oneembodiment, the instrumented description 316 can be represented as aninstrumented HDL description in which the original HDL description 304has been enhanced to include a HDL description of the DIC (see FIG. 1A).In another embodiment, the instrumented description 316 can represent aninstrumented netlist (see FIG. 1B). The instrumentor 302 also producesan optional DIC HDL description 318. The DIC HDL description 318 can beutilized by a functional simulator or synthesis and place&route tools.The instrumentor 302 can also produce an optional DIC simulation model322 that permits functional simulation of the instrumented description316. Still further, the instrumentor 302 can output synthesis andplace&route constraints 324 and modified DFT information 326. Thesynthesis and place&route constraints 324 can be utilized by thesynthesis and place&route tools. The modified DFT information 326 canalso be used by the synthesis and place&route tools, so that theresulting electronic system is able to be tested as originally designed.

The instrumentation system 300 also includes a design instrumentationdatabase 320 that stores instrumentation information. Theinstrumentation information includes information on the types ofinstrumentations that have been done, the DIC and other information asexplained in greater detail below. As noted above, an HDL-based hardwaredebugger (e.g., debugger 122) eventually utilizes the DIC informationstored in the design instrumentation database 320 when performinghardware debugging of the electronic system. Additional details on thedesign instrumentation database 320 are provided in FIG. 6 below.

FIGS. 4A and 4B are flow diagrams of detailed design instrumentationprocessing 400 according to one embodiment of the invention. Thedetailed design instrumentation processing 400 is, for example,performed by the instrumentor 110 illustrated in FIG. 1A, theinstrumentor 154 illustrated in FIG. 1B, or the instrumentor 302illustrated in FIG. 3.

The detailed design instrumentation processing 400 initially receives402 a HDL description of an electronic system. The HDL description isthen parsed and analyzed 404. The analysis 404 of the HDL descriptioncan identify portions that cannot be instrumented or that can only beinstrumented in certain ways. The result of the analysis 404 can be usedto determine whether particular instrumentation directives are valid,and thus can be followed by the instrumentor.

Additionally, one or more of design constraints, DFT information,predetermined instrumentation directives, or pre-designed blocks mayalso optionally be received 406. Then, instrumentation directives aredetermined 408. Here, instrumentation directives can be predeterminedand thus provided or can be determined through user interaction. FIGS.5A-5D, discussed below, pertain to user interaction to produceinstrumentation directives.

After the instrumentation directives are determined 408, a customizedDIC is produced 410 based on the HDL description and the instrumentationdirectives. Hence, the customized DIC is tailored to the particular HDLdescription and the particular instrumentation directives. By tailoringthe DIC to the particular HDL description and the particularinstrumentation directives, the customized DIC makes efficient use ofits circuitry. Since the DIC consumes area (e.g., die space) on thehardware product (e.g., semiconductor chip), making the customized DICefficient and compact is advantageous. In producing the customized DIC,the detailed design instrumentation processing 400 is able to reusepre-designed blocks that have already been instrumented. In other words,the customized DIC can communicate with existing DICs of pre-designedblocks that represent other portions of the electronic system (or evenexternal systems).

Additionally, the DIC can be optimized 412 to reduce hardware overheadand/or maximize coverage. Here, the optimization 412 to the DIC enablesthe hardware overhead associated with the DIC to be reduced which isadvantageous in producing or using integrated circuit products. Forexample, cost analysis can be performed during the optimization toexplore the different structures in the context of a givenimplementation technology and given design constraints. Variations ofthe DIC can thus be explored in order to minimize the overhead of theDIC on the hardware in terms of area, delay, power consumption,routability, and/or testability. Variations of the DIC can be describedvia DIC templates. The optimization 412 can also try to increase theeffects of the instrumentation with regards to the hardware overhead.For example, if some certain signals can be examined, some other signalsmay also be able to be examined without any or minimal hardwareoverhead.

Next, a decision 414 determines whether design constraints have beenprovided. Typically, the design constraints are provided in a file whichcontains specifications for area, delay, power consumption, routabilityand testability. When the decision 414 determines that designconstraints have been provided, then the DIC may be modified 416 in viewof the design constraints. Also, modifications to the design constraintsmay be performed so that the overall design of the electronic system(including the DIC) complies with the intent of the original designconstraints. For example, timing constraints may be changed to reflectthe insertion of the DIC. In addition, additional design constraintsmight be generated, which, for example, may be used to guide synthesisand place&route tools in optimizing the DIC.

Following operation 416, as well as following the decision 414 whendesign constraints are not provided, a decision 418 determines whetherDFT information has been provided. When the decision 418 determines thatDFT information has been provided, then the DFT information is compliedwith or reused 420. When complied with, the detailed designinstrumentation processing 400 renders the customized DIC compatible orcompliant with the DFT information (e.g., existing DFT structures in thedesign). For example, scan-chains or boundary-scans can be provided ormodified to take into account the DIC. Alternatively, when the DFTinformation is reused, the customized DIC can make use of portions ofthe circuitry made available through the DFT information and therebymake use of existing circuitry. The modifications to the DFT informationcan reflect the ability of the DIC to utilize portions of the circuitrywithin the electronic system associated with the DFT information as wellas with the ability to modify the DFT information to preserve the intentof the designer after the DIC is included within the electronic system.

Following the operation 420, as well as following the decision 418 whenthe DFT information is not provided, a decision 422 determines whetherinstrumented, pre-designed blocks have been provided. When the decision422 determines that instrumented, pre-determined blocks have beenprovided, then the DIC of each instrumented, pre-designed block isconnected 424 to the current DIC. This facilitates debugging of theelectronic system which contains pre-designed blocks.

Following operation 424, as well as following the decision 422 wheninstrumented, pre-designed blocks are not provided, DIC information isstored 426 to a design instrumentation database. The DIC informationincludes a description of the DIC, the instrumentation directives, andDIC connectivity information. The DIC information can also includecross-reference data that relates elements in the design of theelectronic system (i.e., hardware implementation) to and from the HDLdescription. Then, the customized DIC can then be added 428 to theelectronic system. The customized DIC can be added 428 to the electronicsystem in a variety of different ways. For example, with respect to anembodiment such as illustrated in FIG. 1A, the customized DIC can beadded 428 to the electronic system by producing the instrumented HDLdescription which describes the electronic system with the DIC includedtherein. Alternatively, with respect to an embodiment such asillustrated in FIG. 1B, the customized DIC can be added to theelectronic system by modifying a netlist that defines the electronicsystem.

Following operation 428 the detailed design instrumentation processing400 operates to produce and output 430 the instrumented description, anoptional DIC simulation model and an optional DIC HDL description. TheDIC simulation model can be used by a simulator when functionallysimulating the operation of the DUT. The DIC HDL description may forexample also be used for simulation. Following the operation 430, thedetailed design instrumentation processing 400 is complete and ends.

As noted above, the instrumentation directives can be predetermined andthus provided or can be determined through user interaction. When theinstrumentation directives are predetermined, they can be obtained froma design instrumentation file. In one embodiment, the instrumentationdirectives specify design visibility, design patching and design controlcriteria for particular portions of the design for the electronicsystem. Design Visibility (DV) is monitoring the entire or partial stateof the DUT at, and relative to, predetermined events. An importantaspect of DV is relating the states of operation back to identifiers inthe original HDL description for examination during HDL-based hardwaredebugging. In one embodiment, DV is done by sampling the values of oneor more signals of the DUT for a particular time interval determined byone or more predetermined events. The events are determined by DesignControl which is described below. Design Visibility serves to monitorthe state of operation of the DUT, but does not alter the DUT's behaviorin any way. However, in some situations, it is advantageous to have amethod to alter the behavior of the DUT after the hardware has beenfabricated. Design Patching (DP) is to alter the behavior of the DUT toa predetermined particular desired state at predetermined events. Theevents are determined by Design Control which is described below. Aparticular desired state of a DUT is a particular setting of the valuesof all or a subset of all storage components in the DUT.

Design Control (DC) provides the designer with a method to specify theevents that control DV and DP. DC can be accomplished by one or moretrigger conditions. A trigger condition is a conditional expressioncomprising HDL identifiers where the conditional expression denotes acombination comprising a particular state and/or state transition,and/or history of states and/or history of state transitions, the DUT,or a portion of it, can be in. Each time a particular trigger conditionis met an associated trigger event is produced. One or more triggerevents can be combined to issue a particular predetermined triggeraction which may control the DV and DP and may control other functionsrelated to HDL-based hardware debugging. A unique combination comprisingone or more units of DV and/or DP all controlled by the same triggeraction forms a trigger action group.

A watch-point is a special case of a trigger condition which isexplicitly defined using a predetermined conditional expression of HDLidentifiers. A watch-point has no direct relationship with the HDLdescription other than its expression is made up with identifiers of theHDL description.

A break-point is a special case of a trigger condition, where thetrigger condition is implicitly specified by selecting a particularsource code location in the HDL description. A source code location is aunique combination comprising a file name, a line number and a columnposition within a textual HDL description.

An error trap is a special case of a watch-point where the triggercondition describes an erroneous or undesired state of the hardware. Aproperty check is a special case of an error trap where the triggercondition is explicitly specified by a particular property of a portionof the hardware. In the event such property is not fulfilled the triggercondition is met. Properties to be checked can either be implicitlyderived from the functionality of the hardware or explicitly given bythe designer of the electronic system.

FIG. 5A is a flow diagram of selection processing 500 according to oneembodiment of the invention. The selection processing 500 pertains touser interaction with the HDL description to produce instrumentationdirectives. The selection processing 500 is, for example, performed byoperation 406 illustrated in FIG. 4A when determining instrumentationdirectives.

The selection processing 500 initially displays 502 a HDL description.The HDL description pertains to the electronic system. At this point, auser can interact with a graphical user interface to make a specificinstrumentation directive with respect to the HDL description beingdisplayed. Optionally, to guide a user in his selections, the results ofan analysis of the original HDL description can be displayed as well(e.g., operation 404, FIG. 4A). Examples of the particular types ofinstrumentation directives include a selection of a trigger condition, asampling signal or a patching signal. Hence, a decision 504 determineswhether a trigger condition selection has been made. When the decision504 determines that a trigger condition selection has been made, thentrigger condition selection processing 506 is performed. Alternatively,when the decision 504 determines that a trigger condition selection hasnot been made, then a decision 508 determines whether a sampling signalselection has been made. When the decision 508 determines that asampling signal selection has been made, then sampling signal selectionprocessing 510 is performed. On the other hand, when the decision 508determines that a sampling signal selection has not been made, then adecision 512 determines whether a patching signal selection has beenmade. When the decision 512 determines that a patching signal selectionhas been made, then patching signal selection processing 514 isperformed. Following any of operations 506, 510 and 514, as well asfollowing the decision 512 when a patching signal selection has not beenmade, instrumentation optimization can be performed 516. Theinstrumentation optimization operates to consolidate the variousselections so that the DIC required to implement the various triggerconditions, sampling signals and patching signals can be efficientlyimplemented. Following the operation 516, a decision 518 determineswhether more selections are to be made by the user. When the decision518 determines that more selections are to be made, then the selectionprocessing 500 returns to repeat the decision 504 and subsequentoperations. Alternatively, once the decision 518 determines that no moreselections are to be made, the selection processing 500 is complete andends.

The trigger condition selection processing 506 illustrated in FIG. 5Acan be utilized to select or establish implicit trigger conditions orexplicit trigger conditions. An example of an implicit trigger conditionis a break-point, and an example of an explicit trigger condition is awatch-point, or an error trap, or a property check.

FIG. 5B is a flow diagram of break-point processing 520 according to oneembodiment of the invention. The break-point processing 520 representsan embodiment of the trigger condition selection processing 506 in thecase in which an implicit trigger condition (namely, a break-point) isinvolved.

The break-point processing 520 initially identifies 522 feasiblebreak-point conditions and types. Typically, such information isobtained by analyzing the original HDL description (e.g., operation 404,FIG. 4A). Next, the feasible break-point conditions and types aredisplayed 524. Here, the feasible break-point conditions and types canbe displayed to a user by a user interface. At this point, a user isable to select a location within the HDL description of the electronicsystem where a break-point is to be set. In one embodiment, a userinterface assists the user in making such a location selection withrespect to the HDL description (i.e., HDL location). A decision 526determines whether a HDL location has been selected. When the decision526 determines that a HDL location selection has not yet been made, thenthe decision 526 causes the break-point processing 520 to await such aselection. Once the decision 526 determines that a HDL location has beenselected, then a decision 528 determines whether the selected HDLlocation is permitted. In other words, the decision 528 determineswhether it is valid to instrument the location within the HDLdescription of the electronic system with a break-point. When thedecision 528 determines that the selected HDL location is not permitted,then an error message is displayed 530. On the other hand, when thedecision 528 determines that the selected HDL location is permitted,then the status type of the selected break-point is updated 532. Next,break-point information is entered 534 into the trigger conditiondatabase for later processing. The break-point information comprises theHDL location of the selected break-point, and the current status type.According to one embodiment, the status type for a selected break-pointis “selected”.

FIG. 5C is a flow diagram of explicit trigger condition selectionprocessing 540 according to one embodiment of the invention. As notedpreviously, one example of an explicit trigger condition is awatch-point. The explicit trigger condition selection processing 540begins with a decision 542 that determines whether a trigger conditionexpression has been received. In one embodiment, a user interfaceassists the user in providing such information. The trigger conditionexpression defines the explicit trigger condition being set. When thetrigger condition expression has not yet been received, the decision 542causes the explicit trigger condition processing 540 to await receipt ofsuch information (selections). When the decision 542 determines that atrigger condition expression has been received, the status type of theselected trigger condition is updated 544. For example, the status typefor the selected (explicit) trigger condition is “selected”. Thentrigger condition information is entered 546 into the trigger conditiondatabase. The trigger condition information includes the triggercondition expression, the HDL identifiers involved in building thetrigger condition expression, and a status type.

Although the break-point processing 520 and the explicit triggercondition processing 540 illustrated in FIGS. 5B and 5C pertain toselection and/or entry of trigger conditions, it should be noted thatselections can also be made to de-select previously selected triggerconditions. Such processing is generally similar to the selectionprocessing, with the major exception being that the status type of theselected trigger condition is updated to “non_selected”, meaning that noinstrumentation shall be performed regarding to that portion of the HDLdescription.

FIG. 5D is a flow diagram of sampling signal selection processing 560according to one embodiment of the invention. The sampling signalselection processing 560 is, for example, one representativeimplementation of the sampling signal selection processing 510illustrated in FIG. 5A.

The sampling signal selection processing 560 begins with a decision 562that determines whether a signal selection has been received. Here, auser is able to select signals by selection of an HDL identifier withinthe HDL description of the electronic system. In one embodiment, a userinterface assists the user in making such a selection with respect tothe HDL description. Hence, the decision 562 determines whether such asignal selection has occurred. When the decision 562 determines that asignal selection has not yet occurred, the sampling signal selectionprocessing 560 awaits such a selection. Once the decision 562 determinesthat a signal selection has been received, then a decision 564determines whether the selected signal is to be associated with anexisting trigger action group of a prior signal selection or whether itbecomes a member of a new trigger action group. When decision 564determines that the signal selection is to be associated with anexisting trigger action group, a decision 566 determines whether theuser has selected an existing trigger action group. In one embodiment, auser interface assists the user in making such a selection. When thedecision 566 determines that a trigger action group selection has notyet been received, the sampling signal selection processing 560 awaitssuch a selection. Once the decision 566 determines that a trigger actiongroup has been selected, the selected signal is associated 568 with theselected trigger action group. On the other hand, when the decision 564determines that the selected signal shall become a member of a newtrigger action group, a new trigger action group is created 570 and theselected signal is associated 568 with that new trigger action group.Following operation 568, the status type of the selected signal isupdated 572. The status type for a selected signal is updated 572 to“selected”, meaning that the selected signal is selected forinstrumentation. Following operation 572 the selected signal is entered570 into a signal database (see FIG. 6). Following the operation 570,the sampling signal selection processing 560 is complete and ends.

Patching signal selection processing can also be performed in a similarmanner as the sampling signal selection processing 560 illustrated inFIG. 5D. In other words, the patching signal selection processing 514illustrated in FIG. 5A can also be represented by the processing 560illustrated in FIG. 5D. Besides selection of sampling or patchingsignals in accordance with the processing illustrated in FIG. 5D,similar processing can also be performed to de-select sampling orpatching signals, with the major exception that the status type of theselected signal would be updated to “non_selected”, meaning that noinstrumentation shall be performed regarding that particular signal.

Design instrumentation databases can be structured in a variety of ways.FIG. 6 is a diagram of a design instrumentation database 600 accordingto one embodiment of the invention. The design instrumentation database600 is, for example, suitable for use as the design instrumentationdatabase 114 illustrated in FIGS. 1A and 1B or the designinstrumentation database 320 illustrated in FIG. 3.

The design instrumentation database 600 includes a break-point database602 that stores break-points. The design instrumentation database 600also includes a signal value database 604 that stores signals within theelectronic system that are to be sampled or patched. Hence, thebreak-points and the signal values, respectively stored in thebreak-point database 602 and the signal value database 604, representinstrumentation directives (e.g., design visibility, design patchingand/or design control criteria) that govern the characteristics of theresulting DIC and its capabilities. Additionally, the designinstrumentation database 600 includes a DIC database 606, across-reference database 612, and a Register-to-Physical (R2P) database614. A representation of the resulting DIC that is produced by theinstrumentor is stored in the DIC database 606. The cross-referencedatabase 612 stores the associations of HDL identifiers (variables)within the HDL description to broaden the design visibility. The R2Pdatabase 614 stores translations from registers to physical addresses.The registers are, for example, registers of the DIC used to configurethe DIC and hold the status of the DIC and the DUT during hardwaredebugging. Physical addresses are given for each register to access thatregister in its implementation inside the DIC. Further, the designinstrumentation database 600 includes a text-to-netlist (T2N) database608 and a netlist-to-text (N2T) database 610. The T2N database 608 andthe N2T database 610 provide for each HDL identifier the associationsbetween the HDL location and elements within the netlist (internalrepresentation of the electronic system).

According to one embodiment, a design instrumentation database (forexample, the design instrumentation database 114, 600) can be builtusing a variety of techniques and, for example, comprise the followingelements:

One or more file objects each holding information referring to a HDLsource file, such as a file name, an absolute path name to the(original) HDL source file, an absolute path name to the instrumentedversion of the HDL source file, a hardware description language the HDLsource file is written in, and optional signatures of the HDL sourcefile and/or the instrumented version of the HDL source file. Forexample, cyclic redundancy checking can be used to compute suchsignatures.

One or more source location objects each can hold information regardinga combination of a reference to a file object, a line number positionand an optional column position and an optional offset (such as acharacter offset) within the HDL source file the file object refers to.

One or more hierarchical instance objects, each referring to ahierarchical building block, can hold information regarding one optionalreference to a parent hierarchical instance object (which could be thehierarchical instance which instantiates the instance this hierarchicalinstance object refers to). Also included could be zero or morereferences to child hierarchical instance objects (where a child isdefined as the hierarchical instance which is instantiated by theinstance this hierarchical instance object refers to), an optional nameand a reference to a source location object.

One or more signal objects which can relate to Design Visibility, eachsignal object can hold information regarding a qualified hierarchicalpath name to a signal in the HDL design, a reference to a sourcelocation object where the declaration of the corresponding signalsresides, one or more references to source location objects of HDLstatements which relate to the corresponding signal, an optionalreference to a hierarchical instance object where the signal resides,and an optional reference to a HDL type declaration.

Zero or more break-point objects each break-point object referring to abreak-point of an HDL design and each break-point object can hold atleast information regarding a reference to one source location objectdenoting the source location of the break-point, and a reference to ahierarchical instance object denoting the hierarchical instance in whichthe break-point resides.

Zero or more watch-point objects each referring to one particularwatch-point in the HDL design and each watch-point object can hold atleast information regarding a reference to a signal object denoting thesignal that the watch-point corresponds with.

In one embodiment of the invention the design instrumentation databasecan be implemented as a software program using object-oriented softwaremechanisms. In case the design instrumentation database is implementedas a software program, its elements (for example, the above-describedobjects) could be implemented as commands of a computer language. Eachcommand can have one or more arguments to denote the informationregarding the associated object. Having a design instrumentationdatabase which can be described in terms of a computer software languagehas the advantage that such a design instrumentation database can easilybe migrated and transported in between a wide variety of differentcomputer systems, as long as the computer system supports the underlyingcomputer software language that the design instrumentation database iswritten in. One example of such a computer software language that couldbe used for a design instrumentation database is TCL/Tk.

Storing the contents of the design instrumentation database can then beperformed by generating a computer software program written in theunderlying computer software language. For example, the instrumentor 110could be used to generate such a computer program. The HDL-basedhardware debugger 122 could then execute the computer programrepresenting the Design Instrumentation database 114 to regenerate thecontents of the Design Instrumentation database for further processing.

FIG. 7A is a block diagram of an instrumentation system 700 according toone embodiment of the invention. The instrumentation system 700represents a more detailed block diagram of an instrumentor togetherwith a design instrumentation database. For example, the instrumentationsystem 700 can be a more detailed embodiment of the instrumentationsystem 300 illustrated in FIG. 3.

The instrumentation system 700 receives a HDL description 702 of anelectronic system. A Design Instrumentation (DI) graphical userinterface 704 can display the HDL description on a display device. Auser can interact with the graphical user interface 704 to make or enterinstrumentation directives. A front-end module 706 receives the HDLdescription 702 and parses the HDL description 702 to form a parse-treestructure. The resulting parse-tree structure is stored in a parse-treedatabase 708. A code generation module 710 reads the parse-treestructure from the parse-tree database 708 and produces a hierarchicaldesign representation associated with the electronic system. Thehierarchical design representation provides a description of the designsbehavior and structure, such as a hierarchical netlist. The hierarchicaldesign representation is stored in a hierarchical design database 712. ADI optimization module 714 interacts with the information stored in thehierarchical design database 712. The information stored in thehierarchical design database 712 is also supplied to an analysis module716. The analysis module 716 interacts with the parse-tree database 708as well as the hierarchical design database 712 to analyze the HDLdescription of the electronic system design. The analysis includescontrol flow analysis which determines the feasible break-points whichare stored in a trigger condition database 718. Control flow analysis isfurther described in “High-Level Synthesis” by Daniel D. Gajski et al.,Kluwer Academic Publishers, 1992, which is hereby incorporated byreference. For each location in the HDL description which correlates toa control flow branch condition node a unique combination of the HDLlocation and the trigger condition given by the control flow conditioncan be added as a feasible break-point into the trigger conditiondatabase 718. The purpose of control flow analysis is to reflect thatbreak-points can be set at very particular locations in the HDLdescription which pertain to HDL control flow statements.

The instrumentation system 700 also includes a location module 724 thatinteracts with the parse-tree database 708 and the hierarchical designdatabase 712 to produce source code location information represented asT2N information for a T2N database 726 and N2T information for a N2Tdatabase 728. The T2N information provides a method to obtain allelements in the parse-tree database 708 or the hierarchical designdatabase 712 which refer to an identifier at a given location in the HDLdescription. The N2T information provides a method to relate a givenelement of the parse-tree database 708 or the hierarchical designdatabase 712 to the originating location in the HDL description. Alocation query manager 730 interacts with the T2N database 726 and theN2T database 728 to allow a DI manager 732 to relate a location withinthe HDL description 702 to an element within a netlist (i.e., theparse-tree and/or the hierarchical design representation) and viceversa. The DI manager 732 receives the instrumentation directives,processes them and adds them to the appropriate database (i.e., thetrigger condition database 718 or the signal database 722).Instrumentation directives can be given using file-based DI criteria734, interactively by the graphical user interface 704, or via pragmasin the HDL description. The use of instrumentation directives isexplained in greater detail below. The DI manager 732 then interactswith the trigger condition database 718, the signal database 722, thelocation query manager 730, and the DI optimization module 714 to checkeach instrumentation directive for its validity. The informationregarding the validity is available in the trigger condition database718 and the signal database 722.

The DI optimization module 714 receives trigger conditions from thetrigger condition database 718 and also receives a DIC template from aDIC template database 720. Still further, the DI optimization module 714interacts with a signal database 722 to receive signals that are to beexamined and/or modified. The DI optimization module 714 performsvarious optimizations regarding the instrumentation directives to reducethe hardware overhead and/or broaden the instrumentation coverage.Additional details on DI optimization are provided below.

For the above-mentioned location determinations with respect toselections, the DI manager 732 queries the location query manager 730 torefer to identifiers in the HDL description 702, elements in theparse-tree database 708, and elements in the hierarchical designdatabase 712.

Selection status types are used to hold the selection information (i.e.,the instrumentation directives) and exchange the selection informationbetween the DI user interface 704, the DI manager 732 and the DIoptimization module 714. The selection status types used for theselection of implicit trigger conditions, explicit trigger conditions,sampling selections and patching selections can comprise: feasible,selected, implied, and not_selected.

The instrumentation directives can be provided in at least three ways,namely, user-based (interactive), file-based, and via pragmas in the HDLdescription. The user-based approach has been described above. Ingeneral, a user (e.g., an electronic system designer) makes designvisibility, design patching, and design control selections. Moreparticularly, the designer can select in the HDL description whichbreak-points, watch-points, error-traps, and property checks will beavailable for activation during HDL-based hardware debugging. Theseselections are stored in the trigger condition database 718. Thedesigner also selects in the HDL description which signals shall beavailable for examination during HDL-based hardware debugging. Theseselections are stored in the signal database 722. The designer selectsin the HDL description which signals shall be available for patchingduring HDL-based hardware debugging. These selections are stored in thesignal database 722.

When instrumentation directives are provided in a file, the file-basedDI criteria 734 is a human and/or computer readable rule set whichdescribes which signals shall be made visible, which signals shall bemade patchable, which break-points are enabled, and which triggerconditions shall be made detectable. The directives in the file-based DIcriteria 734 may be expressed in any of the HDL languages that thesystem accepts as input or may be expressed in a specifically designedlanguage. The directive to select an explicit trigger condition can, forexample, comprise a keyword to denote that the selection is a triggercondition, and a conditional expression of HDL identifiers which must bemet to issue a trigger event. Implicit trigger conditions, such asbreak-points, can, for example, be specified by a source code locationin the HDL description. The directive to select a signal for samplingcan, for example, comprise a keyword to denote that the selection is fora to-be-sampled signal, the unique HDL identifier of the selectedsignal, and an associated trigger action group. The directive to selecta signal for patching can, for example, comprise a keyword to denotethat the selection is for a to-be-patched signal, the unique HDLidentifier of the selected signal, and an associated trigger actiongroup. The file-based DI criteria 734 can be directly read by the DImanager 732 which stores selections of trigger conditions into thetrigger condition database 718 and stores selections of signal values tobe made visible and/or patchable into the signal database 722.

As noted above, the instrumentation directives can be provided viapragmas in the HDL description of an electronic system. Pragmas are HDLcode fragments which are inserted into the HDL description to definedesign visibility, design patching and design control. These pragmas areadded to the HDL description such that the behavior of the design of theelectronic system is not altered. One implementation adds pragmas to aHDL description as specially-marked HDL comments. By placing the pragmasin comments, other tools which read the HDL description containing thepragmas will be unaffected. However, the front-end module 706 canrecognize and interpret these pragmas inside the comments. Moreparticularly, providing instrumentation directives via pragmas can beaccomplished by the front-end module 706 recognizing the pragmasenclosed within comments and placing the appropriate information intothe parse-tree database 708. This information is read by the DI manager732 which stores the necessary information in the trigger conditiondatabase 718 and the signal database 722.

Several examples of pragmas are provided below. These pragmas arewritten in the form of a HDL comment with an indicator (e.g., “B2SI”) todifferentiate them from other comments. In the following examples,following the identifier “B2SI”, the remainder of the pragma describeseither a design control, or a design visibility, or a design patchingdirective. The exact form of the pragmas depend on the HDL languagebeing used. The following are examples of pragmas written in VerilogHDL.

The following example shows a comment including a pragma for designcontrol.

always @( a or b or c or d or e or f ) begin   if( cond == 4'b1111 )begin    // B2SI trigger(“trigger_name ”, (a == 2'b10) && (d * e < f +5'b1100));   end  end

This pragma produces a trigger condition that is active if theexpression(a==2′b10) && (d*e<f+5′b1100)evaluates to true. The expression has the same meaning and variablescoping as it would were it a regular HDL expression. This trigger canalso be placed in the control flow of the design so the trigger will notbe active unless the control flow is active. In this example,(cond==4′b111) must also be met to issue a trigger event. The triggercondition has a name (“trigger_name”) so that other pragmas may refer tothis trigger condition.

The following example shows a comment including a pragma for signalvisibility.

module mod1( in1, in2, in3, out );  input in1, in2;  input in3; // B2SIvisible  output out;  . . .

Here, the visibility pragma is being used to mark “in3” as visible.

The following example shows a comment including a pragma for signalpatching.

module mod2( in1, in2, in3, out );  input in1, in2;  input in3;  outputout;  reg [1:0] aa; // B2SI patchableHere, the patching pragma is being used to mark “aa” as patchable. Thetrigger condition for the sampling and/or patching can be specified byassociating it with a trigger action group (by referring to a triggername, for example “trigger_name”), or during HDL-based hardwaredebugging.

The optimization of the design instrumentation can enhance its effectsand can reduce hardware costs of the DIC. One example of an optimizationfor enhancing the effects of the instrumentation is implicationanalysis. One example for an optimization which aims to reduce thehardware costs of the DIC is resource sharing.

The selections of various trigger conditions and signals for samplingand/or patching may potentially imply other signal selections based ontheir controlability and observability dependencies. Controlability andobservability are, for example, commonly used concepts in Automatic TestPattern generation of combinational and sequential logic. See D.Bhattacharya and J. P. Hayes, “Hierarchical Modeling for VLSI CircuitTesting,” Boston: Kluwer, 1990, p. 159, which is hereby incorporated byreference. Implication analysis works as follows. Initially, thehierarchical design database 712 and the DI optimimization module 714are consulted to determine whether a trigger condition with the statustype “ “selected” implies certain other trigger conditions. If so, theimplied trigger conditions can also be detected during HDL-basedhardware debugging, have their status type set to “implied”, and bestored into the trigger condition database 718. Secondly, thehierarchical design database 712 and the DI optimization module 714 canbe consulted to determine whether certain other signal values areimplied by the selected signals. In particular, the implied signals canbe derived from the selected signals plus some calculations duringHDL-based hardware debugging. Each implied signal is then stored withits status type set to “implied” into the signal database 722.

Resource sharing is a widely used optimization which is, for example,used in synthesis. Although resource sharing can be performed using manydifferent approaches, in one approach to resource sharing, the DIoptimization module 714 operates to share resources in the DIC asfollows. First, by consulting the DIC template database 720, the DIoptimization module 714 knows about the structure and the cost model ofthe DIC and can determine whether trigger conditions and signals to besampled have commonalities which can be utilized for resource sharing.Second, the hierarchical design database 712 and the DIC templatedatabase 720 can be consulted by the DI optimization module 714 whendetermining whether other signals should instead be sampled, since suchsignals imply all the selected signals, but their sampling requires lesshardware overhead or leads to additional signal visibility. Third, byconsulting the DIC template database 720, the DI optimization module 714knows about the structure and the cost model of the DIC and candetermine whether trigger conditions and signals to be sampled havecommonalities which can be utilized for resource sharing. Fourth, byconsulting the DIC template database 720, the DI optimization module 714knows about the structure and the cost model of the DIC and candetermine whether signals to be patched have commonalities which can beutilized for resource sharing.

Once the trigger conditions and the signals to be sampled and/or patchedare determined, other portions of the HDL design can be integrated evenif such portions are not described by a synthesizable HDL descriptionbut are available as synthesized and physically realized hard blocks,such as previously designed hard blocks. If the hard blocks aresynthesized from instrumented HDL and include DIC, regardless whetherthe DIC is a complete or a partial, the previously inserted DIC can bere-used for debugging the hard blocks. The distinction between partialversus complete DIC is described in greater detail below.

In order for a hard block to be re-used, it should have associated DIdata stored in an associated design instrumentation database. FIG. 7B isa diagram of a hard block resolution system 750 according to oneembodiment of the invention. The data needed are a hard block's DICdatabase 752, a hard block's trigger condition database 754, a hardblock's signal database 756, and optionally HDL description 758. Often,vendors of hard blocks do not want to expose the internal workings oftheir design by showing its HDL description (e.g., source code). Toaccommodate this need, the HDL description is not required to describethe entire hard block's functionality. Some minimal HDL descriptionproviding just enough text to examine signals, to set watch-pointexpressions for the signals, and to set break-points at HDL locationswhich refer to implemented trigger detection circuitry is enough toenable HDL-based hardware debugging of the hard blocks. For example, ahard block implementing a simple controller might expose the controllerstate variable for sampling and for triggering on its value. It mightalso allow a user to set a break-point when the machine makes certaintransitions or receives certain signals from the circuitry to which itis connected. A hierarchy and hard block resolver 760 processes theinformation from the hard block's DIC database 752, the hard block'strigger condition database 754, the hard block's signal database 756 andthe optional HDL description 758, and merges same into the current HDLdesign's DIC database 736, the trigger condition database 718, thesignal database 722, and the original HDL description 702. As a result,the resolved information will be available during HDL-based hardwaredebugging.

The instrumentor 700 can also perform cross-reference analysis to gatherand store data in the design instrumentation phase such that theHDL-based hardware debugger will be capable of examining signals in theHDL description. Additionally, if the design instrumentationoptimization determines that other signals could be derived from thesampled signals, the HDL-based hardware debugger needs the HDLexpressions to compute the derived signals “on the fly” from the sampledsignals. The expressions are calculated during cross-reference analysisand stored in the cross-reference database 1504.

FIG. 15 is a block diagram of a portion of an instrumentation system1500 which includes a cross-reference analysis module 1502 and across-reference database 1504 according to one embodiment of theinvention. The cross-reference analysis module 1502 can be providedwithin the instrumentation system 700, and the cross-reference database1504 can be provided within the design instrumentation database 612 andutilized by the instrumentation system 700. The cross-reference analysismodule 1502 can couple to the location query manager 730, thehierarchical design database 712 and the signal database 722. Thecross-reference analysis module 1502 reads signal information from thesignal database 722. Each entry in the signal database 722 correspondsto one signal that is either selected or implied to be made visible.Each entry in the signal database 722 also comprises information onwhether the signal is to be sampled and/or patched in the DIC or whetherthe signal is derived from other to-be-sampled signals. In oneembodiment, for each signal that is derived from other to-be-sampledsignals, the following operations are performed. First, thecross-reference analysis module 1502 queries the HDL locationinformation of the signal from the location query manager 730. Thecross-reference analysis module 1502 looks up the signal in thehierarchical design database 712 and determines the proper HDLexpression to compute the derived signal from the set of sampledsignals. The cross-reference analysis module 1502 then writes the HDLexpression into the cross-reference database 1504.

The instrumentor 700 can also perform Design-for-Test (DFT) analysis. Ifthe electronic system contains additional circuitry for testability suchas scan-chains, boundary scan logic, JTAG tap-controllers or similar DFTfeatures, and if such circuitry is described in the DFT information(file) 310, then the circuitry can be shared to reduce the hardwareoverhead of the DIC. Example formats of such a DFT information file isthe Boundary-Scan Description Language (BSDL) or Hierarchical ScanDescription Language (HSDL), both defined by the IEEE 1149.1 JTAGstandard available from the Institute of Electrical and ElectronicEngineers (IEEE) in Piscataway, N.J., which is hereby incorporated byreference.

FIG. 16 is a block diagram of a portion of an instrumentation system1600 which includes a DFT analysis module 1602 according to oneembodiment of the invention. The DFT analysis module 1602 receivesinformation about the DFT information 310, the current implementation ofthe DIC as stored in the DIC database 736 and the hierarchical designdatabase 712, and the register-to-physical (R2P) address translationinformation (e.g., table) provided in the R2P database 614. The resultproduced by the DFT analysis module 1602 is the modified DFT information326, namely, altered register-to-physical address translationinformation (e.g., table), which is needed by post-processing DFT tools.The R2P database 614 needs to be updated each time DIC registers havebeen moved to different physical locations.

A graphical user interface can be used as a way for users to specifyDesign Visibility, Design Patching and/or Design Control. According toone embodiment of the invention, the graphical user interface is thedesign instrumentation graphical user interface 704.

In many circumstances, it is not practical to select everything possiblefor Design Visibility, Design Patching, and/or Design Control due to theoverhead of the DIC. For example, the HDL design together with DIC thatprovides full Design Visibility, Design Patching, and/or Design Controlmay not fit into the target device or may be too costly to fabricate. Onthe other hand, not having selected particular portions of an HDL designfor Design Visibility, Design Patching, and/or Design Control may forcethe user to re-do instrumentation, synthesis, place&route andfabrication in order to obtain the Design Visibility, Design Patching,and/or Design Control needed to diagnose and debug a problem. Re-doingthe entire process may cost significant time and money. Thus, havingvarious levels of granularity available for design instrumentation isvery advantageous as it provides convenient and efficient ways toexplore trade-offs between instrumentation and the overhead costs ofDIC.

A design instrumentation graphical user interface (GUI) can provide auser interface for Design Visibility, Design Patching, and/or DesignControl at various levels of granularity. For example, a user canspecify Design Visibility and/or Design Patching by selecting individualsignals in the HDL design, or a user can select particular bits of suchsignals. In another example, a user can specify Design Control byselecting individual break-points in the HDL design. Alternatively, atmuch more coarse granularity, a user can select entire portions in theHDL design (for example, Processes or Entities in a VHDL description orAlways Blocks or Modules in a Verilog HDL description) for designinstrumentation. In such cases, all signals within the selected designportion would be selected for Design Visibility and/or Design Patchingand all break-points within the selected design portion would beselected for Design Control.

In another embodiment, Design Visibility, Design Patching, and/or DesignControl can automatically be selected by the instrumentor. One exampleof such automatic design instrumentation applies certain rules toidentify areas for Design Visibility, Design Patching, and/or DesignControl. For example, it can automatically detect and extract FSM in theHDL design and automatically select all state variables of those FSM forDesign Visibility and/or Design Patching and all break-points for DesignControl. The automatic detection and extraction of FSM from HDLdescriptions is, for example, described by Kenneth McElvain in U.S. Pat.No. 6,182,268 which hereby is incorporated by reference. Other examplesof HDL design portions that can automatically be selected forinstrumentation are other areas which likely contain design errors orare important to gain an understanding of a design's behavior: businterfaces to embedded microprocessors, input/output interfaces of hardblocks, certain high-level control signals, etc.

The automatic selection of HDL design portions for instrumentation canprovide a productivity boost for users, especially when applied todiagnose, verify and debug legacy HDL designs (such as HDL designswritten some time ago by someone other than the user) or when used byinexperienced HDL designers.

According to one embodiment of the invention, a design instrumentationGUI can be implemented using a selection method 2200 described in FIG.22. As a prerequisite an HDL description comprising one or more HDLsource files is received 2202. Also received are all signals that areavailable in the HDL design for selection 2204 and all feasiblebreak-points in the HDL design 2206, which are, for example, computedduring HDL analysis 404. Next, a user selects 2208 one particular HDLsource file which is then displayed. Optionally, the display of such HDLsource file may include beautifications, such as automatic indentationand/or syntax high-lighting and/or coloring. There are variousapproaches known in the art which can perform such beautifications, forexample using regular expressions analysis or lexicographical analysis.Beautifications such as automatic indentation and syntax high-lightingcan make a GUI more ergonomic.

Once an HDL source file is displayed, all signals which are availablefor selection (as determined by an HDL analysis) are tagged 2210. In oneimplementation the following algorithm for tagging may be used. Thisalgorithm stores all signals and all break-points in one file objectlist.

file_object_list = get_file_object_list(selected file); foreach signalin file_object_list {   if signal is relevant then {     line_number =get_line_number(signal);     start_column = get_start_column(signal);  end_column = get_end_column(signal);   insert button_widget (line_no,start_col, end_col); } }

The decision whether a signal is relevant can depend on whether thesource location of a signal is visible in the display. Since a HDLsource file may be too large to be displayed all at once, only a portionof an HDL source file may be displayed at a particular moment. A taggingmethod may skip tagging signals which currently are not visible. Thiscan improve efficiency of this algorithm (for example, reduce therun-time and/or the memory usage if such tagging method were to beimplemented as a computer software program).

Once signals are tagged 2210, break-points are tagged 2212. Forbreak-point tagging the following algorithm may be used.

file_object_list = get_file_object_list(selected_file); foreachbreakpoint in file_object_list {   if breakpoint is relevant then {    line_number = get_line_number(signal);     column =get_column(signal);     insert button_widget (line_number, column);   }}

The decision whether a break-point is relevant can be determined usingsimilar criteria as in the case for signal tagging and can also be usedto optimize the algorithm.

The button widgets which are inserted at the source locations of signalsand break-points can be graphical elements of a GUI development kit. Forexample, if TCL/Tk is used for GUI development, the button widgets maybe implemented via TCL/Tk tags within a text widget which displays theHDL source file. The TCL/Tk tags may have event binding and if, forexample, a TCL/Tk button press event is detected for a particular TCL/Tktag, a function may be executed which marks the corresponding signals orbreak-point as selected. The TCL/Tk GUI development kit is for exampledescribed in “Effective TCL/Tk programming: Writing better programs withTCL/Tk” by Mark Harrison and Michael McLennan, published byAddison-Wesley, 1998, which is hereby incorporated by reference. Otherimplementations of the Design Instrumentation GUI may incorporate otherwell-known GUI concepts such as Model-View-Control.

Once the signals are tagged 2210 and the break-points 2212 are tagged,then one or more of the tagged signals or break-points are selected2214. A decision 2216 then determines whether more selections are to bemade with respect to other HDL source files. If the decision 2216determines that more selections are to be made, the selection method2200 returns to repeat the operation 2208. On the other hand, when thedecision 2216 determines that there are no more selections to be made,then the selection method 2200 is complete and ends.

FIG. 29 shows an exemplary implementation of such a designinstrumentation GUI 2900 which, for example, can be used as the DIGraphical User Interface 704. The GUI 2900 comprises a menu button pane2901 where important operations are readily accessible for the user, anda design hierarchy browser pane 2902 which allows the user to navigatethrough the HDL design's hierarchy. The GUI 2900 also comprises acombination status and command line interface pane 2903 and a sourcecode browser pane 2908. FIG. 29 illustrates how, for example, DesignVisibility, Design Patching and/or Design Control can be selectedinteractively and how this can be presented to a user via tags. Forexample, a tag 2904 provides a mechanism for a user to select the signal“current_state” for sampling. At the same time, the tag 2904 can informthe user about the current selection status. This is done by showing thetag 2904 as gray in the source code browser pane 2908. Similarly, tag2906 facilitates instrumentation of signal “req1” and the tag 2907facilitates instrumentation of signal “req2.” Also displayed in thesource browser pane are five tags 2910-2914 for break-points that areavailable for instrumentation. The tag 2910 corresponds to thebreak-point in line 50. The tag 2911 corresponds to the break-point inline 51. The tag 2912 corresponds to the break-point in line 53. The tag2913 corresponds to the break-point in line 55. The tag 2914 correspondsto the break-point in line 57. The various panes of the GUI 2900 canalso be referred to a window presented on a display device (typically bycomputer program code).

Once the user makes a selection, the GUI is updated to reflect thechanges. FIG. 30 shows the GUI 2900 after the user has selected thesignal “current_state” for instrumentation. The tag 2904, which wasgray, is now replaced by the tag 2921, which is green, to indicate thatsignal “current_state” has been selected. Also, in the status pane 2903,a message 2922 informs the user about the selections.

FIG. 31 shows the GUI 2900 after the user has selected signal “req1” forinstrumentation. The tag 2906, which was gray, is replaced by tag 2926,which is green, and a message 2927 is displayed in the status pane 2903,to indicate that selection. Similarly, FIG. 32 shows the GUI 2900 aftera user has selected yet another signal, “req2,” for instrumentation. Thetag 2907, which was gray, is now replaced by tag 2931, which is green,and a message 2932 is displayed in the status pane.

FIG. 33 shows the GUI 2900 after the user has selected the break-pointin line 50 for instrumentation. In the source code browser pane 2908,the tag 2910, which was gray, is now replaced by a tag 2935, which isgreen, and message 2936 is displayed in the status pane 2903 to indicatethat particular selection. FIG. 34 shows the GUI 2900 after the user hasselected the break-points in line 51, line 53, line 55 and line 57 forinstrumentation. In the source code browser pane 2908 the tags 2911,2912, 2913, and 2914, which were gray, are now replaced by tags 2941,2942, 2943, and 2944, which are green. From all the prior selections, amessage 2945 is still visible in the status pane 2903 as feedback to theuser about the selections performed.

FIG. 35 shows an example how the user can select a particular HDL sourcefile from a selection menu 2948 of the GUI 2900. The selection menu 2948can, for example, be used to select HDL source files for display (e.g.,operation 2208 of FIG. 22 and/or operation 2308 of FIG. 23.

In order to facilitate the user in finding a good trade-off between theamount of Design Visibility, Design Patching, and/or Design Controladded to the HDL design and the costs associated with the DIC whichimplements the Design Visibility, Design Patching, and/or DesignControl, a design instrumentation method can analyze the cost toimplement the DIC depending on the current selections of DesignVisibility, Design Patching, and/or Design Control. Various parametersinfluence the cost of an electronic system and therefore the costsassociated with the DIC.

1) Additional circuitry needs extra area resources of the targettechnology. If, for example, the target technology is an ASIC, the DICmay increase the size of the die. If the target technology is a PLD or aFPGA, the DIC will occupy additional logic elements or logic blocks, andif, for example, the DIC is implemented using RAM, the DIC will requirea certain amount of memory bits. In some cases the DIC may need moreresources than were left available on a particular target device. Thismay force the design engineer to use a larger—and typically moreexpensive—target device.

2) The DIC may adversely affect the timing of the HDL design. To achievetiming closure (i.e., meet the timing constraints of a specification), adesigner may have to apply extra efforts or may have to spend extraresources in the target technology (which then again could increase thearea costs).

3) The DIC may adversely affect the routability of the HDL design.Sometimes this may force the designer to spend extra routing resources(which again increase the area costs). Alternatively, a more timeconsuming routing method may be needed to find a viable routing of theHDL design which meets the specifications.

4) The DIC may adversely affect the power consumption of the HDL designwhich may require re-design if the power consumptions do not meet thespecification. Also, extra amounts of power or cooling may be needed.

Due to the extra costs of the DIC, full instrumentation may economicallynot be feasible in a lot of cases. Full instrumentation means that allDesign Visibility, all Design Patching and all Design Control possibleis selected for instrumentation and DIC is built for it. On the otherhand, not having instrumented a particular portion of the HDL design mayforce the design engineer to perform a time consuming re-iterationthrough the entire instrumentation flow.

Therefore, it is advantageous to provide a user with detailed feedbackabout the cost of the instrumentation currently selected. Such costanalysis can for example be performed while the instrumentationdirectives are determined (for example, during operation 408). Inanother embodiment of the invention, cost analysis is performed by adesign instrumentation Manager (such as DI Manager 732) and provided toa user via a design instrumentation GUI (for example designinstrumentation GUI 704).

Cost analysis during instrumentation can compute and/or estimate thecost of DIC and the impact of the DIC on the HDL design at variouslevels of detail.

In one example, cost analysis can compute the number of single-bitinputs required for sampling storage (such as sampling storage 908). Inanother example, cost analysis can compute (or estimate) the area toimplement the DIC, measured in units of a predetermined and given targettechnology. If, for example, a Xilinx Virtex FPGA device would be usedas the target device, the DIC cost could be measured in terms of XilinxVirtex slices. (A description of the Xilinx Virtex devices can be foundin the Xilinx Databook 2001 which is hereby incorporated by reference.)If, for example, an Altera Apex PLD is used as a target device, the DICcost could be measured in terms of Logic Elements. (A description of theAltera Apex devices can be found in the Altera APEX20K ProgrammableLogic Device Family Datasheet, 2001, which is hereby incorporated byreference.) If, for example, the DIC would be implemented using astandard cell ASIC, the DIC cost could be measured in terms of memorybits and logic gates of the underlying ASIC technology.

In yet another example, cost analysis could compute or estimate the areacost of the instrumented HDL design as the area cost for implementingthe original HDL design plus the area cost for implementing the DIC.There are various methods known in the art to estimate the area cost ofa HDL design for a given target technology, some of which are forexample applied during RTL synthesis.

And yet another example of a cost analysis could take the area cost ofthe instrumented HDL design and could compute the relation of a device'sresources currently in use to the total device's resources available.Such measure is sometimes referred to as “device utilization” and is acommonly used metric for FPGA or PLD designs.

A command-line interface (CLI) can be used as a means for users tospecify Design Visibility, Design Patching, and/or Design Control. Inone embodiment of the invention the CLI is the design instrumentationGUI 704. Similar to a design instrumentation GUI, a designinstrumentation CLI can provide a user interface for selectinginstrumentation at various levels of granularity. All above-mentionedexamples for the various levels of granularity for selecting DesignVisibility, Design Patching, and/or Design Control in a designinstrumentation GUI can be readily applied to a design instrumentationCLI.

According to one embodiment of the invention, a design instrumentationGUI could be built on top of a design instrumentation CLI. A selectionin the design instrumentation GUI then could issue a command (withoptional parameters) in a design instrumentation CLI. Such a userinterface would have the advantage that selections in the designinstrumentation GUI could be recorded by storing the correspondingcommands of the CLI in a script. Later, a user can then invoke thatscript and automatically execute each of the commands stored in thescript to safely and conveniently replay his selections he entered via aGUI. In another application such a GUI could be used as a convenient andsafe method to generate DIF information such as the DIF information 306or DIF information 734. The person who generates such DIF may be thesame person who processes the DIF (for example, by using the designinstrumentation system 300). Alternatively, the DIF may be processed bya different person.

One aspect of a design instrumentation CLI is that Design Visibility,Design Patching, and/or Design Control can be precisely selected and theselections shall be still valid selections even if changes to the HDLsource files have been applied. Then a user can efficiently iteratethrough design instrumentation and HDL-based Hardware Debugging(including synthesis, place&route, and fabrication) to test and verifychanges in the HDL design—which usually are performed by altering theHDL description. An example of a method which fulfills above mentionedcriteria for engineering change is described below.

Different commands are used to specify Design Visibility, DesignPatching, and/or Design Control. For example, the command “signal add”which takes a qualified hierarchical path name to a HDL signal as anargument can be used to select the corresponding signal for addingDesign Visibility to it (namely, to build the DIC that implementssampling circuitry for that signal). As another example, the command“watch add” which also takes a qualified hierarchical path name to a HDLsignal as an argument, can be used to select the corresponding signalfor adding Design Control to it (namely, to build the DIC thatimplements triggering circuitry for that signal). In still anotherexample, the command “breakpoint add” which takes a qualifiedhierarchical path name to a break-point can be used to specify DesignControl (namely, to build the DIC to implement triggering circuitry forthat break-point).

There are various styles of qualified hierarchical path names known inthe art to specify signals in HDL designs. Those naming schemes forsignals can readily be applied to a CLI. One set of examples can befound in the ModelSim Command Reference Manual by Model TechnologiesInc, which is hereby incorporated by reference.

However, naming schemes for qualified hierarchical path names forbreak-point as they typically are used in software debuggers (whichrefer to a break-point via a combination of a source file name plus aline number) cannot immediately be applied to a design instrumentationCLI since these naming schemes are not unique. Since a HDL statement ina given file and at a given line number of a HDL description may beinside a hierarchical building block (BB) which is instantiated morethan once, there could be more than one break-point with the same filename and line number combination. An example of a naming scheme forqualified hierarchical path names for break-point which overcomes theproblem and which provides a unique descriptor for each break-point isas follows:

The qualified hierarchical path name of a break-point comprises thequalified hierarchical path name to the instance of the BB in which thebreak-point resides, plus a combination of file name, line number andcolumn number of the source location of that break-point.

As it is readily apparent to the reader, the command mechanismsdescribed above for a design instrumentation CLI can readily be appliedto implement a CLI for HDL-based hardware debugger.

FIG. 17 is a data flow diagram illustrating DIC creation processing 1700according to one embodiment of the invention. The DIC and theinstrumented design is created at the end of the design instrumentationprocess. The DIC is described by the DIC HDL description 318. Theinstrumented design is described by the instrumented HDL description316. Additionally, various components of the design instrumentationdatabase 600 are established, including the R2P database 614, the DICdatabase 736, the signal value database 604, and the break-pointdatabase 602. The DIC creation processing 1700 has a data flow describedas follows.

First, the trigger condition database 718 and the signal database 722(which can result from the DI manager 732) are processed by a triggercondition code generation module 1706 and a signal code generationmodule 1708, respectively.

Second, for each entry in the trigger condition database 718, thetrigger condition code generation module 1706 generates the structuresof the trigger detection circuitry for the DIC according to the DICtemplate database 720. Then, such structures are added to thehierarchical design database 712. In addition, proper DIC registerconfiguration rules can be added to a DI rule database 1710.

Third, for each signal designated as to-be-sampled in the signaldatabase 722, the signal code generation module 1708 creates circuitryto sample such signal according to the structure in the DIC templatedatabase 720, and adds the structures to the hierarchical designdatabase 712 and the proper DIC register configuration rules to the DIrules database 1710.

Fourth, for each signal designated as to-be-patched in the signaldatabase 722, the signal code generation module 1708 generates thecircuitry to patch such signal according to the structure in the DICtemplate database 720, and adds such structures to the hierarchicaldesign database 712 and the proper DIC register configuration rules tothe DI rule database 1710.

Fifth, a break-point analysis module 1712 then reads the triggerdetection circuitry from the hierarchical design database 712 and theregister configuration rules from the DI rule database 1710. Knowing thestructure of the DIC from the DIC template database 720, the break-pointanalysis module 1712 creates the break-point database 602. Thebreak-point database 602 comprises all the rules for which the locationbreak-points are possible to be set. The break-point database 602 alsocomprises rules about mutual exclusivities between break-points due tohardware restrictions in the DIC. For example, a certain break-point maynot be used with another break-point because both break-points requirethe same hardware resource in the DIC.

Sixth, signal analysis module 1714 then reads the signalsampling/patching circuitry from the hierarchical design database 712and the register configuration rules from the DI rule database 1710, andknowing the structure of the DIC from the DIC template database 720, thesignal value database 604 is created. The signal value database 604comprises all the rules about mutual exclusivities between signal valuesfor sampling and/or patching due to hardware restrictions in the DIC.

Seventh, the DIC generation module 1716 then reads the DI rule database1710 and the DIC template database 720 and connects all triggerdetection circuitry and all signal sampling/patching circuitry to atrigger processing unit (TPU)(see FIG. 8). Also, the configuration andthe status registers, and the communication controller are added andconnected. The complete structure of the DIC is then written to thehierarchical design database 712 and the entire and complete rule set toconfigure the registers of the DIC is written to the DIC database 736.

Eighth, a DIC register-to-physical mapping module 1718 maps eachregister configuration and each status register in the DIC into anaddress space of physical memory in the design to produce the R2Pdatabase 614. For example, the physical memory could be implemented as aset of scan-chains, in which case the physical address of aconfiguration or status register would be given by the index of thescan-chain used and the bit position within the scan-chain.

Ninth, a DIC writer module 1720 produces the synthesizable HDLdescription of the DIC (e.g., DIC HDL description 318), defined by theconfiguration and status information in the DIC database 736 and the DICstructure stored in the hierarchical design database 712.

Tenth, the DIC writer module 1720 also reads in the original HDLdescription 304, annotates it with the information about the DIC fromthe hierarchical design database 712 and the DIC database 736, andwrites out the instrumented HDL description 316 (e.g., annotated HDLsource code) of the instrumented design for further processing bysynthesis and place-and-route tools.

Eleventh, to support regression testing of the instrumented design usingfunctional simulation, the optional DIC simulation model 322, includingthe necessary HDL wrapper files, is written by a DIC simulation modelgeneration module 1722.

Twelfth, a design constraint analysis module 1724 reads the designconstraint file 308 which holds all constraints created by the designer.The design constraint analysis module 1724 then adjusts the original setof constraints to produce the instrumented design constraint file 324for the instrumented design. Design constraint analysis is described ingreater detail below. Optionally, the signal analysis module 1714 canperform signal equivalence analysis. Often, in an HDL descriptionmultiple different signals in the HDL description will later bephysically connected to the same net. Thus, from a logic level point ofview all signals connected to the same net will have the same logicalvalues in the electronic system. (This is opposite to a physical levelof abstraction where signals connected to the same net may notnecessarily have the same value. For example, the voltage level of twosignals connecting to the same net may be different, depending on whereon the physical die the voltage level is measured).

Signal equivalence analysis can be used to identify groups of equivalentsignals which are all connected to the same net. Signals within oneequivalence group may or may not have the same HDL type, but they haveidentical logical values in the electronic system. The case that two ormore signals from one equivalence group do not have identical logicalvalues in the electronic system can be an indication of a manufacturingfault.

Signal equivalence may be utilized as a design instrumentationoptimization when only one signal per equivalence group is instrumentedfor Design Visibility and/or Design Patching. For example, using thesample values downloaded off the DIC the values of all signals withinthe corresponding equivalence group can be computed and, for example,displayed to a user. Especially in today's designs which contain manysignal busses connected to many instances on an HDL design, signalequivalence analysis can extend Design Visibility and/or Design Patchingat no or small extra costs.

Annotating the HDL description adds the HDL description of the DIC tothe original HDL description and connects the DIC to the portions of theoriginal HDL description for which design visibility, design patching,and design control has been selected. The annotation can be performedautomatically. The result of the annotation is the instrumented HDLdescription. The instrumented HDL description is the original HDLdescription together with a small amount of HDL description added forthe DIC. The annotations may be added to the hierarchical original HDLdescription in two ways: distributed or monolithic. Distributedannotations are added to each hierarchical element of the original HDLdescription. Monolithic annotations are added to the top-level elementof the HDL design and then connect to other parts of the design. Sincedistributed annotations are more powerful and more complex thanmonolithic annotations, distributed annotations will be described indetail below.

A HDL description can be composed of one or more HDL Building Blocks(BBs). Similarly, the DIC is composed of one or more specially-tailoredHDL BBs, the DICBBs. One such DICBB can be inserted into each BB in theoriginal HDL description. The BB in the original HDL design is termedthe DICBB's host BB (HBB). An example provided below is a Verilogdescription of a simple building block which consists of some simplelogic.

module mod3( in1, in2, out );  input in1, in2;  output out; assign out =( in1 > in2 ); endmodule

Another example provided below is a Verilog description of the HostBuilding Block (HBB) above following annotation (i.e., instrumentedbuilding block) to include one of the DICBBs with some simple buildingblocks which consist of one HBB and some simple logic. In the Veriloglanguage the DICBB is an instantiation of a specially-tailored DICVerilog module.

module mod3( in1, in2, out ); input in1, in2; output out; assign out = (in1 > in2 ); DIC_mod1 DIC_instance( in1, in2 ); endmodule moduleDIC_mod1( in1, in2 ); input in1, in2; // specially-tailored DIC goeshere endmodule

Each DICBB communicates with its associated HBB by connecting to theHBB's signals. Design visibility of a particular HDL identifier residingin a HBB can be accomplished by connecting the identifier to theassociated DICBB. The internal circuitry of the DICBB is created usingthe knowledge of the signal connections. This mechanism allows designvisibility, design patching, and design control to be supported by theDIC. The above example shows a DICBB connected to two HDL identifiers“in1” and “in2”. The circuitry inside DIC_mod1 can utilize the signalsfor the purpose of design visibility of one or both the signals and/orfor creating watch-points which monitor one or both of the signals.

If a symbolically-encoded HDL identifier is made visible, symbolicvalues can be displayed for it during HDL-based hardware debugging. Todo this, each symbolic value needs to be associated with the actualbinary code assigned to it during synthesis (116 in FIG. 1A.). Since itis desirable for the instrumentation to be independent of the synthesis,the HDL-based hardware debugger cannot rely on any information from thesynthesis about the association between binary codes and symbolicvalues. Consequently, each of the symbolic values must be connected tothe DICBB so that the circuitry inside the DICBB can explicitly know thebinary codes assigned to each symbolic value. During HDL-based hardwaredebugging, the encoding information is obtained from the instrumentedHDL design.

Hardware description languages can have type information which definesthe type of values for particular signals in the HDL design. Forexample, in VHDL a signal can be of an integer type. When those signalsget implemented into a netlist description at gate-level—typically thisis done during synthesis—those type values may get encoded into digitallogic, namely “0” and “1”.

In order for a hardware debugging system to be efficient (in terms ofoverhead for the DIC) type conversions may be used. During HDL analysis(for example, HDL analysis 404) the type of one or more signals may beextracted. Such extraction can, for example, be performed using wellknown techniques which operate on the parse-tree of an HDL description.During HDL analysis it may be determined that DIC could be implementedmore efficiently if an instrumented signal would use a different HDLtype.

For example, a type using a minimum bit-width for encoding signal valuescould in some target technologies be implemented with less hardwareresources than a HDL type using one-hot encoding. Various optimizationcriteria may be applied to determine which type is preferable for theDIC. Such criteria can be area cost, number of flip-flops required, etc.

For such signals two type conversions will be generated during HDLanalysis. One type conversion, the O2I Type Conversion, converts theoriginal type (as described in the original HDL description) into thetype used for implementing the DIC. A second type conversion, the I2OType Conversion, is the inverse of the first type conversion. Both typeconversions will be stored in the design instrumentation database forlater use by the HDL-based hardware debugger. Later, during HDL-basedhardware debugging both type conversions may need to be used. Forexample, the O2I Type Conversion may be used when a user specifies awatch-point using the original HDL type values of the correspondingsignal. In this case, the O2I Type Conversion is used to compute thevalues for the watch-point as needed in the DIC. In another example, theI2O Type Conversion is used to back-annotate sample data to the HDL typevalues of the corresponding signals. The I2O Type Conversion may also beused when a user selects a different radix to display sample values inthe HDL-based hardware debugger.

In the hardware debugging system according to system 100, the typeconversions will also be written out in the instrumented HDLdescription. Thus the HDL describing the type conversions must besynthesizable by subsequent synthesis. In the hardware debugging systemaccording to system 150 where HDL analysis may be performed insidesynthesis, the type conversions can be stored using the synthesis'internal representations.

An HDL design may contain folded hierarchy which means that at least oneBB of the HDL description is instantiated more than once in the HDLdesign. To accommodate the fact that a user may need to instrument(insert Design Visibility, Design Patching and/or Design Control)differently for each instance of a folded BB, various methods forannotating the HDL description exist. Each method has its advantages anddrawbacks.

One method for annotating an HDL description which contains foldedhierarchy and where at least one instance of the folded BB isto-be-instrumented is performed by HDL source code replication. For eachinstance of the to-be-instrumented folded BB a copy of the HDLdescription of the folded BB is created to form a new BB. The HBB of thefolded BB then instantiates the new, replicated BB rather than the old,folded BB. Sometimes this process is called uniquifying the hierarchy.Since the to-be-instrumented BB is now uniquified (i.e., un-folded), theHDL description of it can be annotated as in the case of non-foldedhierarchy. The replication of the HDL description to uniquify can bedone by the instrumentor, for example, the instrumentor 110. This methodis very easy and it is clear to the user how the HDL description wasannotated. However, this method may not always be applicable since itsignificantly changes the HDL design which may require adjustments, forexample, to synthesis scripts, design constraints, etc.

A second method for annotating HDL descriptions with folded hierarchy isless intrusive to the HDL design. Rather than replicating HDL sourcecode and changing the HDL design by uniquifying the hierarchy, thismethod utilizes optimizations found in most of today's synthesis tools.FIG. 43 describes such a method by using a simple example of a HDLdesign 4000. The HDL design 4000 has one top-level BB (4107) whichinstantiates one other BB (“Inst2”) twice; the one instance of BB“Inst2” is 4106; the other is 4105. Each instance of BB “Inst2” againinstantiates another BB (“fold”) twice which results in four instances:instance 4106 instantiates 4103 and 4104; instance 4105 instantiates4101 and 4102. An example written in VHDL is provided in FIGS. 44-1,44-2, and 44-3. The VHDL Entity “repeated_inst” of FIG. 44-1 can, forexample, be the BB instantiated in 4101, 4102, 4103, and 4104. The VHDLEntity “folded2” of FIG. 44-2 can, for example, be the BB instantiatedin 4105 and 4106. The VHDL Entity “two_level” can, for example, be thetop-level instance 4107.

If a BB is to be instrumented, a DICBB would be inserted within this BB.Now, in this annotation method, if a folded BB is to be instrumented foreach instance of a BB, one DICBB can be inserted into this BB which thenbecomes the DICBBs' HBB. For example, BB “fold” is instantiated fourtimes (4101, 4102, 4103 and 4104) throughout the entire HDL design 4000,therefore four DICBBs are inserted into BB “fold”: DICBB “A”, “B”, “C”and “D”. This results, for example, in instances 4001, 4002, 4003, 4004,which are instantiated in instance 4101, etc. However, only one DICBBinstance is connected to the DICBB of the HBB's HBB. For example, onlyDICBB “A” (4011) of BB “fold” (4102) is connected to DICBB “E” (4015) ofBB “Inst2” (4105), and only DICBB “E” (4015) is connected to the MDICBB“G” (4007). The DICBBs “B” and “D” (4012 and 4014, respectively) are notconnected at all, and DICBB “C” (4013) is connected to DICBB “F” (4016),but DICBB “F” (4016) is not connected to the MDICBB “G” (4007). FIGS.45-1, 45-2, and 45-3 show an example of an annotated VHDL description ofthe HDL design shown in FIGS. 44-1, 44-2, and 44-3. This example clearlydemonstrates how DICBBs get instantiated into HBBs and how they getconnected.

Later, when the instrumented HDL description is synthesized a synthesistool can remove the so-called dangling DICBBs (i.e., the DICBBs whichare not connected, directly or indirectly, to an MDICBB). Removingdangling elements in a-HDL design is a typical optimization performed bymost state-of-the-art synthesis tools and will result in an instrumentedHDL design without any unnecessary overhead for DIC.

Compared to the first method, the second method has a much lower impacton the HDL design. Both methods described herein (and their variations)can not only be applied to instrument folded BB but they can similarlybe used to annotate HDL descriptions which contain other foldedhierarchy structures such as instantiation loops, VHDL generatestatements and so on.

Electronic system debugging at RTL can be much more productive thandebugging a lower levels of abstraction since the diagnosis is performedat the same level of abstraction the electronic system (or at leastparts of it) has been designed. To facilitate RTL source level debuggingit is advantageous to have Design Control, namely trigger conditions,that can be specified and activated by a user at RTL.

Break-points can be employed as one example of such RTL Source Leveltriggers, if such break-points correspond to RTL HDL control statements.Examples of such RTL HDL control statements are “IF” and “ELSE” in VHDLand Verilog HDL. RTL HDL control statements can be detected during theanalysis of the HDL description (for example, operations 203, 404, or522).

Break-points are supported by adding signals to the HBB which are activewhen the control flow which the break-point is modeling is active, andare inactive otherwise. The added signals are then connected to the DICassociated with the HBB and are used when the circuitry of the DIC iscreated. The following example shows the Verilog HDL fragment of a HBBwhich has simple control flow logic.

 1 module mod4( in1, in2, out );  2 input in1, in2;  3 output out;  4 5 always@ ( in1 or in2 ) begin  6  if (( in1 == 1'b0 ) | | ( in2 ==1'b1 )) begin  7   out = 1'b1;  8  end else begin  9   out = 1'b0;10  end 11 end 12 13 endmoduleLine numbers have been added to the above example for referencepurposes, the line numbers are not part of the Verilog description.There are two lines, line 6 and line 8, which can have a break-point.These lines correspond to the two control flow branches which arise fromthe “if” conditional statement on line 6.

The next example shows the Verilog HDL fragment of the above exampleannotated such that the added circuitry supports two break-points.

module mod4( in1, in2, out );  input in1, in2;  output out;  reg bp1,bp2; // Added during instrumentation  always@ ( in1 or in2 ) begin   bp1= 1'b0;   bp2 = 1'b0;   if (( in1 == 1'b0 ) | | ( in2 == 1'b1 )) begin   out = 1'b1;    bp1 = 1'b1;   end else begin    out = 1'b0;    bp2 =1'b1;   end  end  DIC_mod2 DIC_instance( bp1, bp2 );  endmodule  moduleDIC_mod2( bp1, bp2 );  input bp1, bp2;  // specially-tailored DIC goeshere  endmoduleNote signals “bp1” and “bp2” have been added to the HBB. Each signal isactive (set to logical 1) only when the control flow branch that thesignal is modeling is active. The signals are connected to theassociated DICBB DIC_mod2 and can be used by the circuitry inside theDICBB to create break-point circuitry.

Another example of how break-points can be supported is described by thefollowing Verilog fragment. In this case break-points are aware of thedesign conditions under which they can be reached.

if(in1 == 1'b0) begin   if(in2 == 1'b1) begin     . . . // break-point 1  end else begin    . . . // 1 break-point 2   end end  bp1 = (in1==1'b0) && (in2 == 1'b1);  // condition for break-point 1 bp2 = (in1==1'b0) && (! (in2 == 1'b1));  // condition for break-point 2

The DICBBs in the instrumented HDL design communicate with each other byconnecting to identifiers that have been added to their respective HBBsand which are also connected to the HBB's ports. The following exampleshows the Verilog HDL fragment which consists of two BBs. BB mod6 isinstantiated by BB.

module mod5( in1, in2, in3, out ); input in1, in2, in3; output out; wiretmp_out; assign out = ( in1 > tmp_out ); mod6 instance( in2, in3,tmp_out ); endmodule module mod6( com1, com2, out ); input com1, com2;output out; assign out = com1 {circumflex over ( )} com2; endmodule

The following example shows the Verilog HDL fragment of the aboveexample after being annotated.

module mod5( in1, in2, in3, out ); input in1, in2, in3; output out; wiretmp_out; wire DIC_com2;  // Added during instrumentation assign out = (in1 > tmp_out ); mod6 instance( in2, in3, tmp_out, DIC_com2 ); DIC_mod3DIC_inst3( DIC_com2 ); endmodule module mod6( com1, com2, out, DIC_com1); input com1, com2; output out; inout DIC_com1;  // Added duringinstrumentation assign out = com1 {circumflex over ( )} com2; DIC_mod4DIC_inst4 ( DIC_com1 ); endmoduleThe annotation consists of: (1) DICBBs DIC_mod3 and DIC_mod4 which havebeen added to their respective HBBs mod5 and mod6. (2) Signal DIC_com1which has been added to HBB mod6, added to the port list of HBB mod6,and connected to DIC_mod4. (3) Signal DIC_com2 which has been added tothe HBB mod5 and connected to the DIC_com1 port of the DIC_mod4 DICBBand to the DIC_mod3 DICBB. Consequently, the DIC_mod4 DICBB communicateswith the DIC_mod3 DICBB via the connection of DIC_mod4 to signalDIC_com1 which is connected through port DIC_com1 of mod6 to signalDIC_com2 of mod5 which is connected to DIC_mod3.

In a typical use case an HDL description comprises many HDL source fileswhich may be located in many different directories of a computer filesystem (or even spread out over the file systems of many networkedcomputers). In such cases it is common for design engineers to writeso-called synthesis scripts which provide an automated manner to informsynthesis about from where it can received the various HDL source files.During the many iterations of synthesis, such a synthesis scriptrelieves the design engineer from the laborious and error-prone task tomanually specify each HDL source file to the synthesis again, and again.

Therefore in a hardware debugging system where repeatedly instrumentedHDL descriptions need to be provided to synthesis, it is desirablethat 1) such synthesis scripts for synthesizing the instrumented HDLdescription can automatically be generated by the instrumentor, or that2) the file and directory structure in which the instrumented HDLdescription is stored by the instrumentor closely resembles the file anddirectory structure of the original HDL description.

When generating the instrumented HDL description various alternativesfor annotating the HDL description exist:

First, the HDL description of the DIC (which is added to the HDLdescription) can be written following common coding standards regardingbeautification, indentation etc. This enhances the legibility of the HDLdescription for the DIC by a user and facilitates the understanding andthe maintenance of such HDL description by design engineers.

Second, the HDL description for the DIC may be added to the HDLdescription in such a manner that it causes the least amount ofintrusion. For example, if it is desirable that line numbers ofstatements in the original HDL description and in the instrumented HDLdescription must be identical, then the HDL description of the DIC maybe appended to existing lines in the original HDL description.

Third, if the contents of the DIC shall be hidden from a user,encryption techniques may be used. A simple technique which makes itvery difficult for a user to read (and understand) the HDL descriptionof the DIC is to use illegible naming schemes for signals and other HDLelements.

An original design of the electronic system (e.g., original HDLdescription) can be instrumented with either a complete DIC or a partialDIC. A complete DIC comprises a communication controller and a triggerprocessing unit (TPU). While a complete DIC, such as shown in FIG. 8,includes a communication controller and a TPU, a partial DIC does notinclude these components. An original HDL design may be instrumentedwith a partial DIC if it is to be used inside another instrumented HDLdesign which has a complete DIC. For example, an original HDLdescription could be instrumented with a partial DIC if it were to beused as a hard block. Although an instrumented HDL design with acomplete DIC can be used as a hard block if its communication controllerand TPU are disabled, this wastes hardware and thus space.

Instrumenting with a complete DIC can be accomplished by adding aspecial DICBB which is referred to as the “master” DICBB (MDICBB) whichcomprises a communication controller and a TPU. The MDICBB is placedinto an HBB of the original HDL design which allows the MDICBB tocommunicate with the host communication controller. For example, in aVerilog design, the HBB of the MDICBB would be the Verilog module whichis the top-level module in the design hierarchy—the HBB would be the onemodule in the design which is not instantiated in the Verilog design.The MDICBB is connected to the DICBB in the MDICBB's HBB. Consequently,the MDICBB can communicate with all other DICBBs in the instrumented HDLdesign so that said MDICBB can gather, process, and transmit to the hostcommunication controller information from the other DICBBs. Thefollowing example shows the Verilog HDL fragment of an above example fora basic building block (re module mod3) after it has been annotated.

module mod7( in1, in2, out, DIC_com3 ); input in1, in2; output out;inout DIC_com3; // Added during instrumentation assign out = ( in1 > in2); DIC_mod5 MDICBB_inst( DIC_com3 ); endmoduleNote that in this example, mod7 is the top-level module of the originalHDL design and DIC_mod5 is the MDICBB. DIC_mod5 communicates to theenvironment by connecting with signal DIC_com3 which has also been madea port of the HBB mod7.

In performing design constraint analysis, the design constraint analysismodule 1724 reads the design constraint file 308 which holds allconstraints that ensure the HDL design meets the area, delay, powerconsumption, routability, and/or testability specifications made by thedesigner of the electronic system. The design constraint analysis module1724 then analyzes the instrumented HDL design stored in thehierarchical design database 712 and adjusts the original set ofconstraints to the inserted DIC and possibly adds additionalconstraints. Both sets of the constraints together can be written intothe instrumented design constraint file 324 for the instrumented HDLdesign. The additional constraints attempt to minimize the impact of theDIC on the area, delay, power consumption, routability, and/ortestability of the HDL design.

FIG. 8 is a block diagram of a representative design instrumentationcircuit (DIC) according to one embodiment of the invention. Therepresentative DIC 800 includes a plurality of probe circuits, namelyprobe circuitry 802, probe circuitry 804 and probe circuitry 806. Theprobe circuitry 802-806 couple to a trigger processing unit 808. Thetrigger processing unit 808 is configurable circuitry which is used toprocess trigger events and issue corresponding trigger actions. Suchcorrespondence between the trigger events and the trigger actions can begiven as complex trigger conditions. A complex trigger condition can bea complex conditional expression between two or more trigger events.Propositional or temporal logic may be used to describe suchexpressions. The trigger processing unit 808 controls the ability of theDIC 800 to detect trigger conditions and to sample and/or patch signalvalues. The acts of detection, sampling and patching can be independentfrom each other. When trigger conditions are detected, the triggerprocessing unit 808 triggers sampling (visibility) or patching ofsignals within the DUT. In this regard, the probe circuitry 802-806couple to electrical signals within the DUT. Each of the probe circuitry802-806 is designed to perform a sampling of a signal, a modification toa signal, or a detection of a trigger condition. Typically, thesesignals or conditions are digital conditions. However, in the case inwhich the DUT includes analog and digital portions, the probe circuitry802 can include an analog-to-digital (A/D) converter 810 so as toconvert analog signals to digital signals prior to being received at theprobe circuitry 802. The representative DIC 800 also includes statusregisters 812 and configuration registers 814. The status registers 812store certain status information and the configuration registers 814store certain configuration information.

A communication controller 816 couples to the status registers 812 andthe configuration registers 814. Hence, a HDL-based hardware debugger isable to communicate with the DIC via the communication controller 816.More particularly, the HDL-based hardware debugger can read and setregisters within the status registers 812 as well as within theconfiguration registers 814. As a result, the communication controller816 allows configuration data to be sent to the DIC 800 and status datato be retrieved from the DIC 800. The communication controller 816 canimplement a method (i.e., run-time method) for externally reading andwriting the configuration registers 814 which configure the DIC 800 andexternally reading the status registers 812 (memory) which store thesample values. In one embodiment, the register values can be read or setusing a standard connection defined by the IEEE 1149.1 JTAG standard,available from the Institute of Electrical and Electronic Engineers inPiscataway, N.J., which is hereby incorporated by reference.

In order to maintain flexibility in HDL-based hardware debugging, theDIC is configurable at run-time. Externally configurable registers areused to change the detection of HDL-based trigger conditions and theselection of signals to be sampled and/or patched without the need tore-implement the design of the electronic system.

There is also a general need for the DIC to communicate with componentswhich are not instrumented. This external communication can beimplemented by connecting signals between the DIC and the othercomponents. One example would be an external signal that the DICactivates when any trigger condition is met. In another example, the DIChas external connections to notify and be notified about certainconditions which occur in an optional embedded processing unit (e.g.,CPU) and thus support hardware/software co-debugging.

Additional details concerning representative implementations for thetrigger processing unit 808 and the probe circuitry 802-806 are providedbelow. This circuitry is added to the original design of the electronicsystem. For the purposes of the discussion below, it is assumed that thehardware debugging system 100 of FIG. 1A is being used. Hence, thecircuitry for the DIC is added to the original HDL description asadditional HDL by the instrumentor 110 in producing the instrumented HDLdescription 112.

FIG. 9 describes a representative generic configurable circuitry 900which can implement design sampling and design patching according to oneembodiment of the invention. The circuitry 900 includes a register 902,a multiplexer 904, a tri-state register 906, and a storage 908. When theregister 902 is to be sampled, a selector signal 910 selects a registerinput 912 to drive the register 902 via multiplexer 904. A sample enablesignal 914 enables the tri-state buffer 906 to drive a register output916 onto a data bus 918. The storage 908 couples to the data bus 918 andcan thus store the value at the register output 916. For each successivesample, the value on an address bus 920 is incremented. Alternatively,when the circuitry 900 is to be patched, the address bus 920 selects theproper patch value from the storage 908. The multiplexor selector signal910 selects the data bus 918 to drive the input to the register 902 viathe multiplexer 904, and the selector signal 914 disables the tri-statebuffer 906, thereby driving the value from the storage 908 into theregister 902.

Storage 908 can also be implemented by sampling circuitry. Samplingcircuitry can use sets of registers or Random Access Memory (RAM) asstorage for sampling predetermined signals. The sampled values canthereafter be read from the storage and communicated to the HDL-basedhardware debugger. One implementation of storage 908 is a circularbuffer of depth M which continuously samples predetermined signals. Whena predetermined trigger action occurs, sampling is stopped. At whichpoint the circular buffer contains the M last values of all sampledsignals. To save circuitry, the sampling circuitry can be shared formany signals. For example, a configurable crossbar, implemented eitheras a full crossbar or as a multiplexor network, will allow many signalsto share the same storage (e.g., circular buffer).

Design patching can also be implemented by patching circuitry. Accordingto one embodiment, the patching circuitry provides a method for patchingpredetermined internal signal registers. For each register in the designof the electronic system which is to be made patchable, the patchingcircuitry can include a companion register and simple control circuitry.The companion register holds the patch value(s) and is run-timeconfigurable. The patching circuitry operates as follows: First, duringconfiguration of the DIC, the companion storage is loaded with a desiredvalue. Second, under the control of a particular trigger action, thepatching circuitry forces the patched register to take some configuredvalue from the companion storage. This patching circuitry thus allowspatching to be used for many applications including, but not limited to,debugging and fixing previously fabricated hardware.

Design visibility and design patching a re controlled by particulartrigger actions which are determined by design control circuitry. FIG.10 illustrates a representative generic configurable trigger detectioncircuit 1000 according to one embodiment of the invention. The triggerdetection circuit 1000 operates to detect trigger conditions and issuetrigger events.

The trigger detection circuit 1000 includes a configurable triggerregister (TR) 1002 that stores a trigger value that is compared to amonitored signal (ISR) 1004 by a comparator 1006. The mode of thecomparator 1006 can be controlled by a configurable trigger comparisonregister (TCR) 1008. Examples of different comparison modes are test forequivalence, test for smaller-than, etc. The ability to configure thetrigger register (TR) 1002 and the trigger comparison register (TCR)1008 allows the electronic system designer the flexability to check fora wide variety of trigger conditions during HDL-based hardwaredebugging. A configurable trigger enable register (TER) 1010 allows thetrigger condition to be activated or disabled. If the trigger conditionimplemented by comparing the monitored signal (ISR) 1004 to the triggerregister (TR) 1002 is met and the trigger enable register (TER) 1010 isenabled, a trigger condition signal 1012 becomes active to denote atrigger event. A trigger detected register (TDR) 1014 can be used tostore such a trigger event, which can be subsequently read duringHDL-based hardware debugging to determine whether a trigger event hasoccurred.

While FIG. 10 illustrates the representative generic configurabletrigger detection circuit 1000, for various more specific situations,specialized design control circuitry provides more efficient hardware.Examples of these specific situations, including state based FiniteState Machines (FSMs), transition based FSMs, data-path registers, andtemporal logic, are described below.

State based FSM design control circuitry provides a configurable methodto detect whether an FSM is in a particular state—a condition whichdepends on the value of the FSM's state register. For simplicity, aone-hot encoded state-machine is described herein. For other stateencodings, the design control circuitry can be implemented similarly.FIG. 11 illustrates a representative state based FSM design controlcircuit 1100 according to one embodiment of the invention. For each FSMstate register that is to be instrumented to detect particular states,the state based FSM design control circuit 1100 is added. Ato-be-instrumented one-hot encoded FSM 1102 has a state register 1104which is n bits wide and which is sensitive to the clock signal 1106.The state based FSM design control circuit 1100 that is added includes atrigger register 1110 which has the same bit-width n as the stateregister 1104 and which is sensitive to the same clock signal 1106. Anoutput 1112 of the state register 1104 is compared to an output 114 ofthe trigger register 1110 using a combinatorial network 1116. Thecombinatorial network 1116 implements a trigger condition signal 1118.The trigger condition signal 1118 produced by the state based FSM designcontrol circuit 1100 can be a single bit output function and can bedescribed in its behavior by the following Verilog code.

module m1116 (n1112, n1114, n1118);   parameter n = 32;   input [n−1:0]n1112;   input [n−1:0] n1112;   output n1118;   wire n1118 = | (n1112 &n1114); endmoduleThus to detect a particular current state in the one-hot encoded FSM1102, one can set the corresponding bit in the trigger register 1110 tological “1”. The trigger register 1110 can be configured withappropriate values through a connection (link) 1120. The triggercondition signal 1118 will then be logically “1” to denote the triggerevent.

Transition based FSM design control circuitry provides a configurablemethod to detect whether a FSM is undergoing a particular statetransition—a condition which depends on the value of the state registerand also on the activity and values of the input signals of the FSM. Forsimplicity, a one-hot encoded state-machine is described herein. Forother state encodings, the design control circuitry can be implementedsimilarly.

FIG. 12 illustrates a representative transition based FSM design controlcircuit 1200 according to one embodiment of the invention. For each FSMthat is to be instrumented for detecting particular state transitions,the transition based FSM design control circuit 1200 is added. Theto-be-instrumented one-hot encoded FSM 1202 has a state register 1204which is n bits wide and which is sensitive to a clock signal 1206. Thetransition based FSM design control circuit 1200 that is added includesa trigger register 1208 which is sensitive to the clock signal 1206, andis o bits wide where o is the number of different state transitions ofthe FSM 1202. A combinatorial network 1210 performs a unique one-hotencoding of each different state transition into output 1212 and thus isconnected to the n bit wide output 1214 of the state register 1204 aswell as to the m bit wide input 1214 of the FSM 1202. A combinatorialnetwork 1216 is connected to a o bit wide output 1218 of the triggerregister 1208 and the o bit wide output 1212 of the combinatorialnetwork 1210. A trigger condition signal 1220 is the single bit outputof the combinatorial network 1216 and can be described in its behaviorby the following Verilog code.

module m1216 (n1218, n1212, n1220);   parameter o = 32;   input [o−1:0]n1218;   input [o−1:0] n1212;   output n1220;   wire n1220 = | (n1218 &n1212); endmoduleThus, to detect a particular state transition in the one-hot encoded FSM1202, the bit in the trigger register 1208 corresponding to the one-hotcode of the particular state transition must be set to logical “1”. A obit wide connection 1222 can be used to configure the trigger register1208 with appropriate values. The trigger condition signal 1220 becomesa logical “1” whenever a state transition is active, which denotes thetrigger event.

For data-path registers, data-path register design control circuitryprovides a configurable method to detect whether a data-path registerhas a particular current value, whether a data-path register has aparticular relationship to other values, or whether a data-path registerhas just changed its value. FIG. 13 illustrates a representativedata-path register design control circuit 1300 according to oneembodiment of the invention. The data-path register design controlcircuit 1300 is coupled to a data-path register 1302 which is sensitiveto a clock signal 1304 and which latches the n bit wide input net 1306into a n bit wide output net 1308. The data-path register design controlcircuit 1300 includes one or more of n+1 bit wide trigger registers1310, 1312, 1314 which all are sensitive to the clock signal 1304. The nbit wide output 1308 of the data-path register 1302 and all the n+1 bitwide outputs 1316, 1318, 1320 of the trigger registers 1310, 1312, 1314are then connected as inputs to a combinatorial network 1322. Thecombinatorial network 1322 provides configurable pair-wise checkingrelations between the current value of the data-path register 1302 andthe n least significant bits of one of the trigger registers 1310, 1312,1314. The relation being checked for can be the equality, non-equality,less than, greater than, etc., and such relation can be determined bythe user. The most significant bit within each of the n+1 bit widetrigger registers 1310, 1312, 1314 is used for enabling (if the bit isset to “1”) or disabling (if the bit is set to “0”) the checking of therelation and can be described in its behavior by the following Verilogcode.

  module m1322 (n1308, n1316, n1318, n1320, n1324);     parameter n =32;       input [n−1:0] n1308;       input [n :0] n1316;       input [n:0] n1318;       input [n :0] n1320;       output n1324;       wirecheck0 = n1316[n] & compare0(n12190, n1316[n− 1:0]);       wire check1 =n1318[n] & compare1(n12190, n1318[n− 1:0]);       wire check2 = n1320[n]& compare2(n12190, n1320[n− 1:0]);       wire    n1324 = check0 | check1| check2;   endmoduleIf one of the relations is satisfied, the trigger condition signal 1324becomes logical “1” to denote a trigger event.

Temporal logic is an extension of conventional propositional logic whichincorporates special operators that operate with time as a variable.Using temporal logic, one can specify how functions behave as timeprogresses. In particular, temporal logic statements can make assertionsabout values and relationships in the past, present, and the future. Asubset of temporal logic can be used to describe interdependenciesbetween trigger events over a certain time period relative to a givenevent, at one or more cycles, or for trigger events of the past. FIG. 14illustrates a representative design control circuit 1400 according toone embodiment of the invention that can be used to implement temporallogic needed for relationships which include signals or trigger eventsfrom previous clock cycles. The trigger condition signal 1402 can bedelayed by a configurable number of cycles of clock 1404 using delayregisters 1406, 1408 and 1410. A multiplexor 1412, under the control ofa trigger control register (TCR) 1414, selects which current or previousvalue of the signal 1402 is sent to output 1416. The output 1416 can beused as an input to temporal logic equations.

The selection of the signal to drive the clock input 1404 of the delayregisters 1406, 1408 and 1410 offers powerful functionality as follows.First, when one of the system clock signals is connected to the clockinput 1404 of the delay registers 1406, 1408 and 1410, events can bedelayed relative to the system clock. Second, when a particular triggercondition signal is connected to the clock input 1404 of the delayregisters 1406, 1408 and 1410, the signal 1402 is delayed relative tothe trigger condition signal.

To implement the capability to control the processing of particulartrigger events over relatively longer periods of time, counters can beused. The counters operate by loading a configured value, counting downfrom the loaded value to zero, and then issuing an event when zero isreached. The selection of the signal to drive the clock input of thecounter offers powerful functionality. First, when one of the systemclock signals is connected to the clock input of the counter, triggerevents can be delayed relative to the system clock. Hence, triggerevents can be made to depend on the system time. For example, triggerevents might be enabled for a certain time period and become disabledotherwise, or become enabled after some time period. Second, when aparticular trigger condition signal is connected to the clock input ofthe counter registers, the operation of the counter is dependent on thetrigger condition signal.

As noted previously, a DIC includes a trigger processing unit (TPU) toprocess all incoming trigger events and to issue appropriate outgoingtrigger actions based on the incoming trigger events. The TPU provides aconfigurable method for calculating complex trigger combinations andother relationships between one or more of the trigger events to producethe trigger actions. The trigger events for processing by the TPU arethe trigger condition signals of the design control circuitry of the DICas described above or signals from circuitry external to the DIC. Forexample, in hardware/software co-debugging of embedded CPUs, suchexternal signals may be the error signals of the CPUs. In anotherexample, when multiple DICs are coupled (e.g., daisy-chained) to supportdebugging of multi-chip systems, another such trigger event could be thetrigger action generated by the other DIC.

In any case, trigger actions computed by the TPU can be used for (butnot limited to) the following uses: (i) determine the beginning and/orthe end of the sampling period of one or more sampled signals for designvisibility; (ii) initiate the overwrite of one or more patch registersfor design patching; (iii) provide a sampling clock in case none of thesystem clock signals shall be used; (iv) notify the communicationcontroller within the DIC that one or more trigger events have occurred,thereby notifying the HDL-based hardware debugger; (v) communicatetrigger events outside the electronic system to attached devices throughexternally connected signals; (vi) communicate with sub-systems insidethe electronic system (e.g., during hardware/software co-debugging ofembedded CPUs, trigger actions may be used as notification signals goinginto interrupt inputs of the CPUs); and (vii) connecting with thetrigger event inputs of another DIC (e.g., when multiple DICs aredaisy-chained to support debugging of multi-chip systems).

A trigger action can also be used to trigger multiple components. Atrigger action group is a unique combination which comprises one or moreunits of design visibility and/or design patching circuitry which is/arecontrolled by the same trigger action. The internal structure of the TPUcan be (but is not limited to) the following: (i) A simple TPU can beused where each trigger event issues exactly one and only one triggeraction. (ii) A TPU can include a configurable combinational networkwhere all the trigger events are inputs to the combinational network andtrigger actions are outputs of the combinational network. For example,the configurability can be provided by a Random Access Memory (RAM)which can be configured by the HDL-based hardware debugger and act aslook-up tables to implement a wide range of different booleancombinational functions. (iii) A TPU can be a configurable finite statemachine where trigger events are inputs to the state machine and triggeractions are outputs of the state machine. In one example, theconfigurability is provided by a set of registers or a Random AccessMemory (RAM) which defines the behavior of the finite state machine andwhich can be configured by the HDL-based hardware debugger. (iv) A TPUcan be a pipelined CPU. The trigger events to be processed can flow intothe TPU as input data, the trigger actions to be issued can berepresented as output data of the CPU, the instruction code of the CPUcan implement complex relationships between the trigger events whichproduce the trigger actions. The trigger action computations may not befinished until a number of clock cycles after the trigger events flowinto the TPU. Consequently, the design visibility circuitry should haveenough memory to store the data which corresponds to the latent triggeractions. Also, the HDL-based hardware debugger should understand thelatency of the trigger actions to correctly associate non-latentsampling data to the latent trigger actions.

Although the instrumentation techniques discussed above pertain todigital signals, it should be understood that these same techniques canalso apply to the digital portion of mixed-signal designs. Stillfurther, with respect to the analog portion of mixed signal designs, ananalog signal can be made visible and also can be used to form triggerconditions. In one embodiment, the analog signal can be made visible byconnecting it to an analog-to-digital converter (ADC) which has beenadded to the DIC. The digital outputs of the analog-to-digital convertercan then be monitored using the design visibility techniques previouslymentioned. A user interface can convert the digital data back to ananalog representation for display to the designer. The analog signal canbe used to form a trigger condition by expressing the trigger conditionin terms of the digital outputs of the analog-to-digital converter.Additionally, a graphical user interface (e.g., the graphical userinterface 704 of FIG. 7A) can convert an analog trigger threshold set bythe electronic system designer to an appropriate set of digital valueswhich can be used to configure the trigger condition.

As noted above, the DIC can be provided within the DUT in either acentralized or distributed manner. More particularly, in order tominimize the impact of the DIC on the electronic system hardware, theDIC can be structured as a monolithic block or as distributed circuitry.The option to choose between these two structures allows the trade-offof area, delay, power consumption, routability, and/or testability ofthe hardware required for the DIC. As a monolithic block, all signals tobe monitored for trigger detection or to be sampled and/or patched arephysically routed from their source to the DIC region where the triggercondition detection and/or the signal value sampling/patching isphysically placed. As a distributed DIC, the circuitry comprising theDIC is placed close to the signals used for triggering, sampling, and/orpatching. For a monolithic DIC block, resource sharing to reduce thearea and power consumption overhead becomes an option. These gains areoffset by the increased delay and area needed for the long routes to theDIC block. A distributed DIC, however, will not offer any resourcesharing, but promises short routes and therefore less impact on thedelays and the routability.

Today, many devices are available which contain large resources ofmemory embedded on-chip (i.e., within the device). This provides a userof a hardware debugging system with interesting choices betweenmonolithic and distributed DIC.

Sampling circuitry (for example, the circuitry 900) can be implementedeither in a monolithic structure while using the embedded (on-chip)memory resources as an efficient implementation for the samplingstorage, or in a distributed structure using resources outside of thedevice which implements the to-be-sampled circuitry. For the latter casea wide variety of options exist to implement such sampling circuitry.Dedicated RAM devices can be used, or RAM devices can be shared withother portions of the electronic system. In another implementation,logic analyzer equipment (which in this case would act as a largestorage component) can be utilized.

In certain cases where storage devices are a limited resource, resourcesharing of the sampling circuitry can be done. FIG. 24 shows a system2400 for resource sharing of sampling circuitry. A switch box 2402connects the DUT 102 with the sampling circuitry 900. At any given time,the switch box 2402 connects some predetermined outputs of the DUT 102with the inputs of the sampling circuitry 900. Outputs of the DUT 102,which are connected to the sampling circuitry 900, thus will be sampled;unconnected outputs of the DUT 102 will not be sampled.

Several connectivity options to connect DUT outputs with samplingcircuitry 900 inputs inside the switch box 2402 exist. They all havetheir advantages and their drawbacks. Among the many options available,there are following.

1) The switch box connects the DUT with the sampling circuitry viawires. The connection is determined during instrumentation and fixed.This switch box implementation has very low hardware overhead. However,reconnecting different DUT outputs with sampling circuitry to sampledifferent signals requires a user to re-run instrumentation, synthesis,place&route and fabrication. This turn-around may take considerable timeand have engineering costs involved.

2) Similar to 1) the switch box uses wires to connect the DUT with thesampling circuitry. Only, this time, the connection can be alteredduring the place&route step. For example, today's place&route tools forFPGA and PLD often have incremental re-routing capabilities and canrip-up and re-route connections in a short time. Under thesecircumstances, this solution, compared to solution 1) has similarhardware overhead but, depending on the place&route tool and the targettechnology involved, may have significantly shorter turn-around time andless engineering costs involved.

3) To implement the connectivity, the switch box uses multiplexers. Theselector input of those multiplexers can be configured at run-time.Thus, the connectivity of the switch box can be altered by a userwithout the need to re-fabricate (re-instrument, re-synthesize,re-place&route) the HDL design. Compared to 1) and 2) this solution mayhave a higher hardware overhead (for example in terms of area and/orrouting resources) but can have a much shorter turn-around time eventhan solution 2). Also, this solution does not force the design engineerto re-fabricate the HDL design which, for example for ASIC targettechnology, may imposes significant costs.

4) The connectivity of the switch box is implemented using time-dividedmultiplexers (TDM) in which case the sampling circuitry is time-shared.While TDM may be a very cost efficient and flexible solution for aswitch box, it may not be applicable for designs (or portions ofdesigns) which are timing critical.

A HDL-based hardware debugger which uses resource sharing for some (orall) the sampling circuitry will then have to receive informationregarding the connectivity of the one or more switch boxes in order toassociate the sample data from the DUT with the signals for which DesignVisibility was requested. Keeping track of such connectivity is simpleand can, for example, be done either inside the HDL-based hardwaredebugger (e.g., for solutions such as 3) and 4)) or can be stored insidea design instrumentation database (e.g., for solutions such as 1) or2)).

Having many choices for implementing Design Visibility in DIC (namelysampling circuitry) is important so that designers can select trade-offsbetween Design Visibility and the overhead of DIC in real lifesituations where resources (e.g., RAM) are often very limited.

Similar to the above-mentioned choices for sampling circuitry usingmonolithic or distributed structures, there exist many choices toimplement Design Control circuitry (such as Design Control circuitry1000). In a monolithic structure Design Control circuitry, for exampletrigger circuitry, can reside within the same device as the instrumentedHDL design resides in. Alternately, Design Control circuitry can beimplemented using a distributed structure using resources outside of thedevice(s) which implement(s) the HDL design. Again, for the latter caseseveral options exist, including using special reprogrammable devices(such as FPGA or PLD), or logic analyzer equipment (which then would actas Design Control circuitry).

While resource sharing of Design Control circuitry is also possible (andcan, for example, be similarly implemented as resource sharing forsampling circuitry), it may not be practical in many cases. DesignControl circuitry typically requires only a fraction of the hardwareoverhead typical sampling circuitry can cost. Therefore, the cost of aswitch box for resource sharing of Design Control circuitry may behigher than the savings from sharing the resources.

It is important to have the possibility of combining multiple DIC(which, for example, can be implemented in separate devices), where eachDIC can be either complete DIC or partial DIC, and each DIC can have amonolithic or a distributed structure, and even further, each DIC cancomprise circuitry for one or more trigger action groups (TAG). Complexelectronic systems, which can comprise many different components whicheach may need to be diagnosed and debugged individually or inconjunctions with other components. To manage all those possibility in ahardware debugging system parameterizable DIC can be used.

Such a parameterizable DIC architecture can, for example, be representedas DIC templates (such as the DIC templates 314). Since typically theDesign Control circuitry to implement break-points is identical, one DICparameter can be the number of break-points instrumented. Anotherparameter for each TAG inside the DIC can be a particular clock net.This can be used to have individual TAG for separate clock domainswithin a HDL design.

Multiple DIC (regardless whether they reside within the same device ofin multiple separate devices) can be connected in a wide variety oftopologies which can be selected for the connection of each DIC'scommunication controller with the host communication controller, or forforwarding trigger events from one DIC to another DIC. Examples ofconnecting multiple communication controllers of DIC with hostcommunication controllers (of the HDL-based hardware debugger) are asfollows.

1) Each DIC's communication controller is individually connected to oneparticular host communication controller. Communication controllers arenot connected among each other.

2) Multiple complete DICs can form a chain. This can be done byconnecting the communication controller of each DIC in a topology asdescribed in FIG. 25 (which, for example, uses the IEEE JTAG standard).The TCK, TMS inputs of the JTAG header are connected to the tck and tmsinputs of each communication controller respectively. The TDI inputs ofthe JTAG header is connected to the tdi input of the first communicationcontroller, the tdo output of the first communication controller isconnected to the tdi input of the second communication controller, andso forth until the tdo output of the second to last communicationcontroller is connected to the tdi input of the last communicationcontroller and the tdo output of the last communication controller isconnected to the TDO output of the JTAG header. This topology has theadvantage that multiple DIC can share one common JTAG header whichreduces the need for expensive IO connections (pins).

3) Each DIC's communication controller is connected to one and the samebus, each communication controller has an individual address on this buswhich allows each communication controller to be individually beaddressed by a host communication controller. The fact that multiplecommunication controllers share a bus as a communication link alsoreduces the need for expensive 10 connections (pins).

Within a hardware debugging system derivatives as well as combinationsof the above described communication controller connection topologiescan be used. Examples of topologies for forwarding trigger events amongmultiple DIC (for example to notify one—or more—DIC that in one or moreother DICs a trigger condition was detected) are as follows.

1) In a daisy-chain topology each DIC could have at least one of thefollowing: one external input signal (in_trigger) which is connected toan input of the TPU to notify such TPU of an external trigger event, andone external output signal (out_trigger) which is connected to an outputof the TPU to notify other circuitry that a trigger action was issued bythe TPU.

2) Another example is a special case of topology 1), where each DICin_trigger is connected to exactly one other DIC's out_trigger, and allDIC have a ring topology. While still using a low mount of routingresources each DIC can be notified about a trigger event which occurredin any other DIC connected in such ring.

3) A hierarchical tree of DIC can be built where one DIC can notify oneor more other DICs about trigger events.

4) Two or more DIC can be connected to a common bus. A trigger event inone DIC would notify all other DIC simultaneously.

Moreover, the monolithic or the distributed structure for the triggerdetection circuitry can be selected independently from the monolithic orthe distributed structure for the signal value sampling, patching, andstoring circuitry. A special case of DIC structure is a DIC withmonolithic trigger detection circuitry and monolithic signal valuesampling and/or patching circuitry. The trigger detection and signalvalue sampling and/or patching circuitry share the same signals. In sucha structure, trigger conditions can only be expressed using signalswhich are also sampled.

FIG. 18 is a flow diagram of HDL-based hardware debugging processing1800 according to one embodiment of the invention. The hardwaredebugging processing 1800 is performed after the electronic system hasbeen fabricated to include a customized DIC.

The hardware debugging processing 1800 initially starts when theHDL-based hardware debugger is initiated 1802 on a host computer. TheHDL-based hardware debugger is preferably a software program thatoperates on the host computer. Next, the host computer couples 1804 withthe operating fabricated electronic system. For example, this coupling1804 can occur through cables that couple the host computer to thecommunication controller 816 of the DIC 800. The DIC 800 can beconsidered part of the DUT or part of the electronic system. Thereafter,when debugging is to be performed, the DIC is configured 1806 forexamination and/or modification of the fabricated electronic system.Here, for example, the configuration registers 814 of the DIC 800 can beconfigured 1806 to perform the appropriate examination and/ormodification of the fabricated electronic system (namely, the DUTtherein). Next, the fabricated electronic system is operated 1808 in thetarget environment and at speed. In other words, the fabricatedelectronic system is the actual hardware that is produced and thenoperated in its normal operating environment (target environment) and atits normal speed of operation. Hence, this facilitates debugging of thehardware (e.g., fabricated electronic system) in its actual environmentand at its actual speed. Thereafter, HDL-based hardware debugging isperformed 1810 on the operating fabricated electronic system. TheHDL-based hardware debugging thus interacts with the user to referencelines or areas of the HDL description associated with the electronicsystem. As a result, users are able to analyze, diagnose, and debugfunctional failures of the electronic system at the HDL level, and usersare able to interact with the electronic system at the HDL level to settrigger conditions and examine and/or modify the electronic systemsbehavior. Following the operation 1810, the hardware debuggingprocessing 1800 is complete and ends.

Once the electronic system 104 having the DUT 102 with the incorporatedDIC 106 has been fabricated, the HDL-based hardware debugger 122 canoperate to debug the DUT 102. The HDL-based hardware debugger 122interacts with a user through one or more user interfaces and interactswith the DIC 106 through a host communication controller. The HDL-basedhardware debugger 122 can, for example, operate to support one or moreof the following functions: (1) browsing the original HDL descriptionfor the HDL design; (2) activating particular trigger conditions out ofthe set of possible trigger conditions implemented in the DIC; (3)de-activating particular trigger conditions out of the set of activatedtrigger conditions; (4) temporarily disabling trigger conditions out ofthe set of previously activated trigger conditions; (5) enablingtemporarily disabled trigger conditions; (6) activating signals to besampled out of the set of possible signals in accordance with theimplementation of the DIC; (7) de-activating signals out of the set ofsignals which were activated for sampling; (8) temporarily disablingsignals out of the set of signals activated for sampling; (9) enablingtemporarily disabled sampling signals; (10) activating signals to bepatched out of the set of possible signals in accordance with theimplementation of the DIC; (11) de-activating signals out of the set ofto-be-patched signals; (12) temporarily disabling signals out of the setof signals activated for patching; (13) enabling temporarily disabledpatching signals; (14) translating HDL-based trigger conditions given bythe designer to the proper register configuration of the DIC; (15)associating trigger conditions with the clock/begin/end events ofsampling and/or patching circuitry; (16) controlling execution of theDIC at run-time such as starting, stopping, single-stepping, running fora given number of cycles, resetting, etc.; (17) capturing the entire orthe partial state of the HDL design, downloading it off the DIC, andstoring it in the proper databases; (18) translating the DIC statusregisters and the sampled signal values back to the HDL source code;(19) displaying the DIC status in one or more formats, including thecurrent data as well as data history; (20) displaying the signalsampling data in one or more formats, including the current data as wellas data history; (21) interfacing with other debugging tools, such asfunctional simulators and software debuggers; (22) performing licensechecks to determine the legality of running the DIC; and (23) performingversion checks of the DIC, and consistency checks of the DIC and thedesign instrumentation database.

A HDL-based hardware debugger GUI can be used as a way for users toactivate certain Design Visibility, Design Patching, and/or DesignControl, for example by setting a trigger condition by activating aparticular break-point. In one embodiment of the invention, theHDL-based hardware debugger GUI is or includes a selection UI (e.g.,selection UI 1902).

A HDL-based hardware debugger GUI can provide a user interface toactivate Design Visibility, Design Patching, and/or Design Control atvarious levels of granularity. For example, a user can activate oneindividual break-point in the HDL design to form a trigger condition.Alternatively, a user can activate all break-points within a particularHDL design portion (for example a Process or Entity in a VHDLdescription or an Always Block or Module in a Verilog HDL description).Having the ability to activate Design Visibility, Design Patching,and/or Design Control at various levels of granularity is veryadvantageous as it provides convenient and efficient ways for users toquickly locate problems within the HDL design. It also facilitatesscript-based automatic regression testing in a batch-mode testing andverification environment. For example, if only those break-points wereselected during instrumentation which relate to error traps, with onesingle action a user can activate all error traps in the HDL designduring HDL-based Hardware Debugging, re-run one or more tests to verifythat none of the error traps get triggered. This can provide designengineers with an efficient HDL-based self-test method.

According to one embodiment of the invention a HDL-based hardwaredebugger GUI can be implemented using an activation method 2300. Once aHDL description is received 2302, the set of signals for which DesignControl was inserted are received 2304, and the set of break-points forwhich Design Control was inserted are received 2306, the user selects aHDL source file for display 2308. Optionally, beautification may beperformed for improved display.

Once a HDL source file is displayed 2308 by the HDL-based hardwaredebugger GUI, all signals are tagged 2310. In one implementation, thefollowing algorithm may be used to tag signals.

file_object_list = get_file_object_list(selected_file); foreach signalin file_object_list {   if signal is relevant then {   line_number =get_line_number(signal);   start_column = get_start_column(signal);  end_column = get_end_column(signal); insert menu_widget (line_number,start_column, end_column);  } }

The decision whether a signal is relevant for tagging can depend whetherduring design instrumentation Design Control was selected for such asignal. In some use models it may be desirable to skip tagging signalsfor which neither Design Visibility, nor Design Patching, nor DesignControl was selected and which are not instrumented. Also, signals whichcurrently are not visible may be skipped for efficiency reasons.

The menu widget inserted for certain signals can provide a user with achoice of different activations. For example, a signal may be activatedfor sampling but not for Design Control (by setting a watch-point onthis signal). The menu widget inserted can be an element from a GUIdevelopment kit. For example, if TCL/Tk is used for GUI development, themenu widget may be implemented using a TCL/Tk menu widget which isassociated with TCL/Tk tags within a TCL/Tk text widget which againdisplays the HDL source code. The TCL/Tk tags may have a TCL/Tk eventbinding. If, for example, a button press event is detected for aparticular TCL/Tk tag, a function may be executed which performs acertain activation of Design Visibility, Design Patching, and/or DesignControl of the corresponding signal.

Once the signals are tagged 2310, break-points are tagged 2312. Next,one or more of the watch-points/break-points are activated 2314. Adecision 2316 then determines whether more activations are to be madewith respect to other HDL source files. If the decision 2316 determinesthat more activations are to be made, the activation method 2300 returnsto reeat the operation 2308. On the other hand, when the decision 2316determines that there are no more activations, then the activationmethod 2300 is complete and ends.

Similar to a design instrumentation GUI, other implementations of aHDL-based hardware debugger GUI may incorporate well known GUI conceptssuch as Model-View-Control.

FIG. 36 shows an exemplary implementation of a HDL-based hardwaredebugger GUI 3000. The GUI 3000 can, for example, be used as theselection user interface 1902. The GUI 3000 comprises a menu button pane3001 to provide the user with easy access to the most importantoperations. The GUI 3000 also comprises a design hierarchy browser pane3002, a combination status and command line interface pane 3003 and asource code browser pane 3008. Within the source code browser pane 3008,tags are used to facilitate the selection and/or activation of DesignVisibility, Design Patching and/or Design Control. For example, tag 3021facilitates the selection and activation of a watch-point associatedwith signal “current_state”, and a tag 3041 facilitates the selectionand activation of the break-point in line 51.

FIG. 37 shows the GUI 3000 after the user has activated the break-pointin line 51 as the trigger condition. In the source code browser pane3008, the tag 3041, which was green, is replaced by a red tag 3051 and amessage 3052 is displayed in the status pane 3003 to indicate thatselection.

FIG. 38 shows the GUI 3000 after the user has started the DIC, the DIChas detected the trigger condition, and the HDL-based hardware debuggerhas downloaded, back-annotated, and displayed the sample data and thestatus data from the DIC in the GUI 3000. To indicate that thebreak-point in line 51 triggered, a tag 3053 is inserted into the sourcecode browser pane 3008 and a message 3054 is displayed in the statuspane 3003. Also inserted into the source code browser pane 3008 is a tag3031 which displays a reference to the value of the signal“current_state” at the time the trigger condition was detected.

FIG. 39 shows the GUI 3000 after the user has selected the tag 3021 toenter a watch-point. A watch-point pane 3061 is displayed which allowsthe user to specify a watch-point as a trigger condition for thecorresponding signal “current_state”. FIG. 40 shows the GUI 3000 whilethe user is entering the watch-point expression 3062“current_state=st_idle1” into the watch-point pane 3061. FIG. 41 showsthe GUI 3000 after the user entered the watch-point and activated thewatch-point. The tag 3021, which was green, is now replaced by a tag3064, which is red, and a message 3065 is displayed in the status pane3003 to indicate that watch-point selection and activation.

FIG. 42 shows the GUI 3000 after the user has started the DIC, the DIChas detected the trigger condition and the HDL-based hardware debuggerhas downloaded, back-annotated and displayed the sample data and thestatus data from the DIC in the GUI 3000. To indicate that thewatch-point “current_state=st_idle1” was detected, a tag 3068 isinserted into the source code browser pane 3008 and a message 3067 isdisplayed in the status pane 3003. Further displayed is, for example, areference to the value of the signal “current_state” at the time thetrigger condition was detected. This is done by inserting a tag 3069into the source code browser pane 3008.

FIGS. 19-1 and 19-2 illustrate a data flow diagram of a debuggingprocess 1900 performed by a HDL-based hardware debugger according to oneembodiment of the invention. An activation user interface 1902 displaysthe original HDL description 304 and provides the designer with a methodto activate and de-activate break-points and other trigger conditionsand to activate and de-activate signals for sampling and/or patching.Once signals for sampling and/or patching are activated, the activationsmay be grouped together to form a unique trigger action group. Eachtrigger action group then gets one or more trigger condition associatedtherewith that control the trigger action group. These activations areused by the HDL-based hardware debugger to configure the DIC atrun-time.

Additional details on trigger condition activations are as follows. Thestructure of the DIC limits trigger conditions to the set of locations(for break-points) and explicit trigger condition expressions (forwatch-points) in the HDL description 304 which were selected or impliedduring design instrumentation. Additional hardware restrictions of theDIC may also limit the activation of trigger conditions in certaincases. In accordance with the structure of the DIC, an activebreak-point database 1904 lists the status type of each triggercondition implemented in the DIC as one of: possible (i.e., thecorresponding trigger condition can be activated); activated (i.e.,designer has activated); and forbidden (i.e., the trigger conditioncannot be activated due to a mutual exclusivity relationship with one ormore currently activated trigger conditions. Initially, a break-pointmanager 1906 copies over the set of trigger conditions from thebreak-point database 602 into the active break-point database 1904 andmarks all entries as possible. To guide the designer in his activations,the user interface 1902 reads the active break-point database 1904 anddisplays the current status for each trigger condition listed. Wheneverthe designer activates a trigger condition out of the set of possibletrigger conditions, the user interface 1902 marks the trigger conditionas activated in the active break-point database 1904 and notifies thebreak-point manager 1906. Likewise, whenever the designer de-activates atrigger condition out of the set of activated trigger conditions, theuser interface 1902 marks the trigger condition as de-activated in theactive break-point database 1904 and notifies the break-point manager1906. The break-point manager 1906 applies the rules in the break-pointdatabase 602 which describe the interdependencies of all triggerconditions and their mutual exclusivity to the current setting in theactive break-point database 1904. Under such rules, any triggercondition which is mutually exclusive with the activated (orde-activated) trigger condition is marked as forbidden (or possible), asappropriate.

Additional details on signal sampling and patching activation are asfollows. To utilize the signal sampling and patching circuitry in theDIC, the designer activates signals for sampling and/or patching, groupsthese activations into one or more trigger action groups, and associatesone or more trigger conditions by which each trigger action group iscontrolled. For patching, the designer also specifies one or more patchvalues and the trigger condition settings under which each patch valueshall be applied. To reflect limitations of the DIC in the sharing ofsampling and/or patching resources, a similar activation mechanism forsignal values exists as for trigger conditions. An active signal valuedatabase 1908 lists the status type of each signal that has been madevisible as one of: possible (i.e., the signal can be activated forsampling and/or patching); activated (designer has activated); andforbidden (i.e., the signal cannot be sampled/patched due to a mutualexclusivity relationship with one or more currently sampled/patchedsignals). Initially, a signal value manager 1910 copies over the set ofall signals listed in the signal value database 604 into the activesignal value database 1908 and marks them as possible. To guide thedesigner in making activations, the user interface 1902 reads the activesignal value database 1908 and displays the current status for eachsignal listed. Whenever the designer activates a signal out of the setof possible signals, the user interface 1902 marks the signal asactivated in the active signal value database 1908 and notifies thesignal value manager 1910. Likewise, whenever the designer de-activatesa signal out of the set of possible signals, the user interface 1902marks the signal as de-activated in the active signal value database1908 and notifies the signal value manager 1910. The signal valuemanager 1910 applies the rules in the signal value database 604 whichdescribe the interdependencies of all signals and their mutualexclusivity to the current setting in the active signal value database1908. Under these rules, any signal which is mutually exclusive with theactivated or de-activated signal is marked as forbidden or possible, asappropriate.

After the various activations have been made with respect to run-timeconfiguration of the DIC, the designer notifies a run-time controller1912 through a run-time user interface 1914 to configure the DIC. Usingthe rules in the DIC database 736, a DIC configuration manager 1916translates the information in the active break-point database 1904 andthe active signal value database 1908 to the proper values for the DIC'sconfiguration registers and writes a DIC configuration file to a DICconfiguration database 1918. A register-to-physical address translator1920 (R2P translator) then accesses the R2P database 614 (i.e.,register-to-physical address translation table) and translates the DICconfiguration file to the proper physical memory locations within theDIC and produces a raw configuration file 1922. The raw configurationfile 1922 is then uploaded into the DIC by a host communicationcontroller 1924 that communicates with the client communicationcontroller 816 inside the DIC 800. This configures the DIC to detect theproper trigger conditions and to sample/patch the proper signals asspecified by the designer. For efficiency, the host communicationcontroller 1924 provides a method of handling incrementally the rawconfiguration file 1922 and uploads only changed data into the DIC 800.The host communication controller 1924 communicates with the clientcommunication controller 816 by transmitting control signals, uploadingdata, receiving control signals, and downloading data via one or moreconnections (communication links). When at least one trigger conditionis detected, the trigger processing unit 808 inside the DIC 800 informsthe run-time controller 1912 via a communication link connected to thehost communication controller 1924.

The HDL-based hardware debugger also performs signal value examination.When the HDL-based hardware debugger has been notified that one or moretrigger conditions have been detected, the host communication controller1924 downloads data from the DIC and stores it in a raw status file1926. This raw status data is then split by the R2P translator 1920 intodata from the DIC status registers and data from the signal value samplememory. The data from the DIC status registers is stored in a DIC statusdatabase 1928. The DIC configuration manager 1916 accesses the DICdatabase 736 and the active break-point database 1904 and determineswhich of the activated trigger conditions were actually detected. Thedetected trigger conditions are then marked as triggered in the activebreak-point database 1904. The activation user interface 1902 thereafterdisplays the detected trigger conditions as marked. On the other hand,the data (values) of the sampled signals from the signal value samplememory are stored in a system state database 1930. A history manager1932 picks up values of the sampled signals from the system statedatabase 1930, analyzes the history based on the sample clock periods,and appends them to a signal value history database 1934. The signalvalue history database 1934 provides a method of storing sampled signalsfor particular sample times. A signal value resolver 1936 reads thesignal value history database 1934, resolves the data back to HDLidentifiers by applying the resolution rules of the cross-referencedatabase 612, and writes the data into a global signal value database1938. Any re-organization and/or transformation of the signal data tosupport HDL identifiers with complex values (for example multi-bit orsymbolically encoded values) can also be performed by the signal valueresolver 1936. Signals, whether selected or implied, which have not beendirectly sampled but which can be derived from sampled values, arecalculated by the signal value resolver 1936 and stored in the globalsignal value database 1938. The global signal value database 1938comprises the current value and the value history of all the signals,sampled and/or derived. The value history can be used for display to thedesigner or for further processing. A format translator 1942 accessesthe global signal value database 1938 and translates the data into oneor more different file formats. For example, the format translator 1942can produce vector change dump files 1944, wave vector files 1946, ordebug data files 1948 suitable for further processing by third partytools such as simulators. The display manager 1940 gets directions froma display user interface 1950 about which values to query for displayfrom the global signal value database 1938. The display user interface1950 uses the original HDL 304 to provide a method for HDL-based signalexamination for the designer.

When software debugging is also to be performed, the debugging process1900 can include a software debugger interface 1960 and a softwaredebugger 1962. Additional details on software debugging are providedbelow with respect to FIG. 20.

Still further, the HDL-based hardware debugger can perform check-pointprocessing. The system state of the HDL design including the DIC isrepresented by the values of the electronic system's registers andinputs. The HDL-based hardware debugger provides a method for saving andrestoring the system state to the system state database 1930. Dependingon whether all the registers and inputs are sampled, or only some ofthem, the system state can be saved in full or partially. Sometimes apartial system state is sufficient, sometimes the full system state isnecessary. The capability to save and restore the electronic system'sstate can be used for many applications. As examples, one applicationcan set the electronic system to a known state during HDL-based hardwaredebugging, and another application can integrate the present inventionwith functional simulators.

HDL-based hardware debugging using the sampling and trigger detectionmethods described in the present invention still may not give everydetail of every internal signal like an event-driven functionalsimulator may give. Thus, it may be desirable to combine both approachesand have one system, where the HDL-based hardware debugging techniquesare used when there is a need for a high execution speed and/orreal-time behavior, and where a functional simulator is used for timeperiods which are not speed-critical but where a great level of detailis needed. In order to combine both styles, the HDL-based hardwaredebugger described in FIGS. 19-1 and 19-2 provides a way to exchangeinformation about the system state with a functional simulator. Mostfunctional simulators provide a method for saving the simulation stateof a simulation model of the HDL design in a checkpoint file using avariety of different file formats. The file formats can be processed bya checkpoint manager 1952. For uploading the state of the simulationmodel into the HDL-based hardware debugger, a simulator checkpoint inputfile 1954 is translated by the checkpoint manager 1952 using thecross-reference database 612 and stored in the system state database1930. To start the functional simulation from a given state of the HDLdesign, the checkpoint manager 1952, using the cross-reference database612, can convert the contents of the system state database 1930 into asimulator checkpoint output file 1956 in a format suitable for afunctional simulator. A checkpoint file 1958 can be used for storing andretrieving the system state of the DUT, for example, for subsequent runsof the HDL-based hardware debugger.

Still further, the HDL-based hardware debugger can perform mismatchprocessing. The mismatches can occur between different runs of the DUT.In some situations it may be useful to find mismatches in the samplingdata gained from running the same version of the DUT under differentconditions. For example, this could be used for verifying that thefunctionality of an HDL design has not changed after the HDL design hasbeen modified. In some other situations it may be useful to findmismatches in the sampling data gained from running two differentversions of the same DUT under identical conditions. To make it easierfor the designer to understand any mismatches found, the HDL-basedhardware debugger can relate mismatches back to the original HDLdescription and display both sets of signal values. The mismatches canalso occur between the HDL description and the DUT. In some situationsit may be useful to compare the functional behavior of a fabricatedelectronic system with the functional behavior of the HDL description ofthe electronic system. A mismatch in the comparison means that some stepin the design flow was incorrect. The electronic system need not befully instrumented since some functional mismatches can be caught withpartial instrumentation.

A representative method for performing such a comparision is as follows:First, the HDL design is instrumented. The instrumentation is mostuseful when the design visibility covers the entire system state.Second, with the instrumentation enabled, run the DUT in an environmentand at a speed for which it was targeted. Third, store all sample datagained from the operation of the DUT. Fourth, starting with the earliestclock cycle for which sample data is available, format the sample dataso that it will be accepted by a functional simulator. Fifth, use theformatted data to set the initial state of the HDL design in afunctional simulation of the HDL design. If the HDL design was partiallyinstrumented, substitute the appropriate “UNKNOWN” simulation value forany un-instrumented inputs or storage elements in the circuit. Sixth,use the functional simulator to calculate the values of the storageelements in the next clock cycle given the initial state set above.Seventh, compare the calculated values of the storage elements with thesample data for the next clock cycle and note any mismatches. If the HDLDesign was partially instrumented, any comparisons to an “UNKNOWN” valueare NOT a mismatch. Eighth, take the sample data for the inputs andstorage elements from the next cycle, format as appropriate, and usesuch to re-set the initial state of the functional simulator. Ninth,while there is more design visibility data left, return to the sixthoperation. The mismatches found in the seventh operation are potentialproblems and should be investigated by the designer. To make it easierfor the designer to understand any mismatches found, the HDL-basedhardware debugger can relate the mismatches back to the original HDLdescription and display both sets of signal values.

In the above representative method, mismatches are found by comparingthe sampling data with the values calculated from the HDL description bya functional simulator. Obviously, the full power and generality of afunctional simulator is not required here. Any method that can calculatedelay-independent functional values from an HDL description can be usedto find mismatches. For example, the cross-reference database cancontain a representation of the necessary function of the HDLdescription and can be used to calculate the values directly.

FIG. 20 is a block diagram of a hardware/software co-debugging system2000 according to one embodiment of the invention. The hardware/softwareco-debugging system 2000 is generally similar to the hardware debuggingsystem 100 of FIG. 1A or the hardware debugging system 150 of FIG. 1B,but the DUT 102 includes not only the DIC 106 but also a CentralProcessing Unit (CPU) 2002. The hardware/software co-debugging system2000 thus permits debugging not only software that runs on the CPU 2002but also debugging the DUT 102. For debugging the software that runs onthe CPU 2602, a software debugger 2004 is used. The software debugger2004 is a software program that runs on a host computer and controls andobserves the execution of the computer software code which runs on theembedded CPU 2002. For example, the software debugger 2004 can be thesoftware debugger 1962 illustrated in FIG. 19-2. The software debugger2004 allows program break-points to be set. Those program break-pointsdefine the condition upon which the program execution is halted suchthat the designer can examine the operation of the software program. Ifthe embedded system (CPU 2002) cannot be halted, the software debugger2004 takes a snapshot of the software program's state for examinationinstead.

FIG. 21 is a block diagram of a hardware/software co-debugging system2100 according to one embodiment of the invention. The hardware/softwareco-debugging system 2100 is generally similar to the hardware/softwareco-debugging system 2000 of FIG. 20 with the addition of an In-CircuitEmulator (ICE) 2102. The ICE 2102 interfaces the software debugger 2004with the CPU 2002. The ICE 2102 is, more generally, a debuggerinterface. An example of such a debugger interface is described in “TheNexus 5001 Forum Standard for a Global Embedded Processor DebugInterface,” which is available by the IEEE-ISTO in Piscataway, N.J., andwhich is hereby incorporated by reference. It should also be noted thatas shown in FIG. 21 the CPU 2002 may not be part of the DUT 102. Ingeneral, the software being debugged can execute on the CPU 2002. TheCPU 2002 need not be within the DUT 102. In other words, the CPU 2002can be part of the electronic system 104 or can even be external to theelectronic system 104 if coupled thereto.

Concurrent debugging of the HDL design and the CPU software deals withthe following two cases: (i) a trigger condition set in the HDL-basedhardware debugger and detected at run-time in the DIC; and (ii) aprogram break-point is set in the software debugger 2004 and detected inthe CPU 2002 and/or the ICE 2102.

The setting and detecting of at least one trigger condition in the DICand examining the operation of the HDL design and/or the softwareprogram can be done in the following operations. First, a triggercondition is set in the HDL-based hardware debugger (HHD) 122. Second,the HHD 122 configures the DIC 106 via a communication link 2104. Third,if the trigger condition is met, one or more trigger actions are issuedin the DIC 106. One trigger action in the DIC 106 notifies the HHD 122via the communication link 2104. One trigger action in the DIC 106notifies the CPU 2002 via a communication link 2106. On the CPU side,the communication link 2106 may be connected to an interrupt input.Fourth, the HHD 122 then downloads the DIC status and the sample valuesfor processing and display. Fifth, the CPU 2002 then notifies the ICE2102 via a communication link 2108. Sixth, the ICE 2102 then notifiesthe software debugger 2004 via the communication link 2110 that atrigger condition was detected. Alternatively, the HHD 122 can directlynotify the software debugger 2004 via the software debugger interface1960. Seventh, the software debugger 2004 then takes a snapshot of thecurrent status of the software program and/or halts the program'sexecution. Eighth, the status and the history of the operation of theHDL design and the software program can then be examined in the userinterface 2116.

The setting and detecting of at least one trigger condition in thesoftware debugger 2004 and examining the operation of the HDL designand/or the software program can be done in the following operations.First, a program break-point is set in the software debugger 2004.Second, the software debugger 2004 sets up the ICE 2102 via thecommunication link 2110. The ICE 2102 monitors some internal portions ofthe CPU 2002 (for example the instruction pointer counter) to determinewhether the program break-point is reached. Third, if the programbreak-point is reached, the following actions are issued: (i) one actionissued by the ICE 2102 notifies the software debugger 2004 via thecommunication link 2110; and (ii) another action issued by the CPU 2002notifies the DIC 106 via the communication link 2106. On the DIC's sidethe communication link 2106 can be connected to an external triggerevent input. Fourth, the software debugger 2004 then takes a snapshot ofthe current status of the software program and/or halts the program'sexecution. Fifth, the DIC 106 then processes the trigger event(s) andinforms the HHD 122 via the communication link 2104. Sixth, the HHD 122then downloads the DIC status and the sample values for processing anddisplay. Seventh, the status and the history of the operation of the HDLdesign and the software program can then be examined in the userinterface 2116. Depending on the debugging tools utilized, the userinterface 2116 can be either integrated into the HHD 122 and/or into thesoftware debugger 2004.

Multi-chip partitioning (MCP) can be used when a HDL design exceeds theresources of a target device. Therefore the HDL design must bepartitioned into smaller parts which each are small enough to fit theresources of the target devices. For example, in FPGA-based prototypinga HDL design which is supposed to be implemented using an ASIC is alsoimplemented using FPGA and/or PLD devices to facilitate the verificationof the HDL design. The FPGA implementation of the HDL design is thenused as a prototype of the ASIC, for example for software development.Since FPGA devices typically lag ASIC in terms of device capacity it isa common situation that the HDL design must be partitioned into two ormore parts which each can be implemented in one single FPGA device, andwhere all FPGA devices are appropriately connected together (e.g., on aprinted circuit board) to implement the entire HDL design.

Many MCP algorithms are known in the art, which, for example, aim tominimize the connection resources in between the separate devices. FIG.26 shows a method for hardware debugging according to one embodiment ofthis invention. The method makes use of the components of the HDL-basedhardware debugging system of FIGS. 1A, 1B and 20.

An original HDL description 108 is received by the instrumentor 110which instruments the HDL design and generates the instrumented HDLdescription 112 from it. The instrumented HDL description 112 isreceived by synthesis and place&route 116 which generates a physicalimplementation of the instrumented design 118. The instrumented design118 is then sent to fabrication 120. The result of that fabrication 120is the electronic system 102 which comprises the DUT 102 which itselfcomprises the DIC 106. The HHD 122 interacts with the DIC to performHDL-based hardware debugging.

Now, in general, two possibilities exist to apply MCP to such a hardwaredebugging method: MCP is performed prior to instrumentation, and MCPfollows instrumentation. This is regardless whether MCP uses manualmethods or automatic partitioning algorithms.

If MCP is performed prior to instrumentation, a hardware debuggingmethod 2700 illustrated in FIG. 27 can be performed according to oneembodiment of the invention. In this case, MCP must operate onhigh-level HDL and must generate partitions described in high-level HDL.As shown in FIG. 27, a MCP unit 180 receives the HDL description 108 andgenerates two or more HDL descriptions (108 a, 108 b, . . . , 108 n) forthe parts of the HDL design. Each HDL design part can eventually beimplemented in one device. For each HDL description of the two or moreparts of the HDL design, a user can instrument that part individually(or can not instrument that part at all). If the user desires toinstrument a particular HDL design part, the corresponding HDLdescription is received by the instrumentor 110 and, depending on theuser's selections for Design Visibility, Design Patching, and/or DesignControl, an instrumented HDL description for the particular part isgenerated. The instrumented (or not instrumented) HDL descriptions foreach part of the HDL design is then received by synthesis andplace&route to generate an instrumented (or not instrumented) HDL designpart (118 a, 118 b, . . . , 118 n). Each of the instrumented (or notinstrumented) HDL design parts then go through a fabrication (120 a, 120b, . . . , 120 n). Each DUT (102 a, 102 b, . . . , 102 n) can then beimplemented in a separate device which (besides other optionalcomponents) is the electronic system 104. The electronic system can thenbe diagnosed and debugged using the HDL-based hardware debugger 122.

If in such a method more than one HDL design part is instrumented, theabove described methods for connecting two or more DIC can be applied.Additionally, when using this method it can be advantageous if the userstake into account the hardware overhead of the DIC and partitions insuch a way that each to-be-instrumented HDL design part is small enoughto fit the target device and still has sufficient resources left for itsDIC.

FIG. 28 illustrates a hardware debugging method 2800 according toanother embodiment of the invention. In this embodiment, MCP isperformed after instrumentation. When MCP follows instrumentation (asillustrated in FIG. 28), the DIC may get partitioned along with the HDLdesign and may be spread across multiple devices. In this case HDL-basedhardware debugging can perform debugging of the entire HDL design. Thereis no need to connect multiple DIC. Also, this method allows for severalvariations: where MCP is prior to synthesis, where MCP followssynthesis, and where MCP is performed inside synthesis.

In a special case, only a particular portion of the HDL design isinstrumented and MCP is performed in such a manner that thisinstrumented portion of the HDL design (including the DIC) ispartitioned completely into one single part and implemented in onesingle device. This special case can have a much shorter turn-aroundtime for engineering changes.

Both possibilities, MCP prior to and following instrumentation, havetheir advantages and drawbacks. In a real life situation one possibilitymay not be applicable or feasible or economical while the other is.Parameters which determines feasibility, applicability and cost of aparticular MCP design flow are, for example, the amount of arearesources available within a particular target device, amount of routingresources available in between the target devices, whether or notre-configurable devices are used, whether or not re-configurableinterconnect is used, etc.

According to one embodiment of the invention, the DIC of a hardwaredebugging system can comprise one or more logic analyzers. Those logicanalyzers can be used to perform sampling (Design Visibility),triggering (Design Control), or combinations of both.

In such a system, the HDL-based hardware debugger (e.g., HHD 122) caninter-operate with the logic analyzers. For example, the HDL-basedhardware debugger can automatically configure one or more logic analyzerto trigger based on a user's activation of Design Control in a HDLdesign. More precisely, instead of the user manually setting triggerconditions in each of the logic analyzers, the user activates DesignControl in the HDL-based hardware debugger and the HDL-based hardwaredebugger translates such activations into configurations for each logicanalyzer involved and inter-operates with each logic analyzer toconfigure it.

In another example, the HDL-based hardware debugger can automaticallyretrieve sample data from one or more logic analyzers for HDL-basedsignal examination by a user. Or, more precisely, the HDL-based hardwaredebugger can check each logic analyzer whether sample data is availablefor downloading, download such sample data, resolve the sample data backto HDL identifiers and display the resolved data of all logic analyzersinvolved for HDL-based signal examination.

The use of external logic analyzers in such a hardware debugging systemhas many advantages: logic analyzers as DIC for Design Visibility andDesign Control can reduce the need for expensive on-chip resources inthe electronic system. Further, logic analyzers are widely used bydesign engineers for diagnosis and debugging of electronic systems andthus often are readily available. A wide variety of logic analyzersprovide interfaces for inter-operation with other tools. For example,the Agilent 16712 Logic Analyzer from Agilent Technologies, Inc. in PaloAlto, Calif. has a remote programming interface which is described inthe “Remote Programming Interface (RPI) for the Agilent Technologies16700 Logic Analyzer System (Version 11-1-01),” available from AgilentTechnologies, Inc. of Palo Alto, Calif., which is hereby incorporated byreference.

The hardware debugging system according to the invention can havenumerous features. The hardware debugging system can, for example, bethe hardware debugging system 100 illustrated in FIG. 1A or the hardwaredebugging system 150 illustrated in FIG. 1B. Exemplary features of thehardware debugging system might include one or more of those featuresexamined below.

One exemplary feature pertains to HDL-based hardware debugging. Whiledebugging an electronic system, the values of numerous signals may beexamined. Relating these values of numerous signals back to the HDLdescription of the electronic system allows a user (e.g., designer) togain an understanding of the operation of the electronic system. Thisenables the debugging to be performed at the same level of abstractionand using the same text description that the designer of the electronicsystem used to design and implement the electronic system. During thedesign phase of an electronic system, there are many transformationsmade to the HDL description to produce the fabricated electronic system.While such transformations conventionally often make it very difficultto difficult to relate a signal in the fabricated electronic system tothe HDL description, the invention is able to relate the signalsautomatically and thus provides an efficient and effective approach todebugging the electronic system.

Another exemplary feature pertains to the ability to debug in a targetenvironment at target speed. Performing HDL-based hardware debugging,while the electronic system is running in an environment and at a speedfor which the HDL design is targeted, provides the following benefits:high processing bandwidth, real-time debugging, and no need fortestbenches. During debugging, all operations may take the same time asin normal (non-debugging) operation which provides high processingbandwidth. For example, booting an operating system is a task whichrequires many clock cycles and is usually too time consuming to be donein functional simulation. In HDL-based hardware debugging, booting maytake the same amount of time which it takes in normal (non-debugging)operation of the electronic system. Consequently, the designer canre-run the booting as often as necessary to fully debug the electronicsystem. Real-time debugging is useful for debugging electronic systemswhich have to maintain a specified real-time behavior in the sense thatcertain operations must be performed within a very well-defined timelimit. Further, since a failure within the electronic system can beobserved, analyzed and diagnosed within the target environment, there isno need to reproduce the failure in a model of the target environment,such as a testbench, for functional simulation or emulation.

Another exemplary feature pertains to the ability to communicate withhardware not instrumented. In some cases it may be important for a DICto communicate with other hardware that was not, or could not be,instrumented. Such communication can be done via dedicated ports of theDIC which can be connected to other devices in the electronic system, orto portions within the same device the DIC resides in. These ports canbe uni-directional or bi-directional. One example use of such ports isto communicate one or more trigger actions to another part of theelectronic system. Another example is to connect an interrupt signalfrom another device to the DIC. The interrupt signal can then be used asa trigger event inside the DIC.

Still another exemplary feature pertains to the ability of the HDL-basedhardware debugger to communicate with other systems. The HDL-basedhardware debugger is a software system which can communicate with othersoftware or hardware systems. The communications can allow transfer ofinformation into, or out of, the HDL-based hardware debugger. Forexample, an electronic system may be able to execute a software programand in such case the HDL-based hardware debugger can communicate with asoftware tool which can debug the software program. The HDL-basedhardware debugger may also communicate with hardware devices. Forexample, the HDL-based hardware debugger may send reset signals tohardware devices which connect to the DUT being debugged. In oneembodiment, the connection to other hardware devices is used to form aJTAG daisy-chain.

Yet another exemplary feature pertains to the ability to providehardware and/or software debugging. Some electronic systems have thecapability to execute a software program. Software tools exist to debugthe programmable hardware. It is advantageous for the designer of theelectronic system to have the capability to debug both the hardware andsoftware aspects of the electronic system concurrently. The HDL-basedhardware debugger can enable such a capability by debugging the hardwareof the electronic system and interfacing with software debugging tools.Interfacing with the software debugging tools can be done by usingcommunication methods previously described. The combined hardware andsoftware debugging system allows the designer to concurrently debug anentire electronic system including both hardware and software aspects.

The HDL-based hardware debugging can be used in many differentapplications. Different embodiments or implementations of the inventionmay be used in one or more of the following applications. Severalexample applications for the HDL-based hardware debugging are examinedbelow.

One exemplary application for the HDL-based hardware debugging isproperty checking at target speed. Functional simulation alone cannotguarantee that a HDL design meets a functional specification for the HDLdesign. Consequently, additional methods of gaining confidence in thecorrectness of the functionality of a HDL design are necessary. Adesigner can increase the level of confidence in the function of the HDLdesign by adding DIC which can detect when the HDL design is operatingcontrary to its functional specification. The DIC can provide propertychecks to assist the designer with identifying various conditions. Thedesigner might also build in property checks to handle anticipateddifficulties. Typically, during HDL-based hardware debugging, theproperty checks are activated and the electronic system is allowed torun in an environment and at a speed for which it is targeted. If theelectronic system operates in a manner that causes a property check toissue a trigger event, the designer has found a potential problem.

Software tools exist that formally prove that certain property checkswill never be triggered under any operating conditions of the design.Unfortunately, such tools may have tremendously long run-times sincethey must exhaustively analyze the design. The HDL-based hardwaredebugging approach does not have the problem of long run-times since allproperty checking is done in hardware that is running at target speed.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware debugging of errors in functional specifications.Some of the hardest functional failures to diagnose aremisunderstandings of the target environment the electronic system isdesigned to work in. Such misunderstandings may lead to mistakes in thefunctional specification of the electronic system. Hence, comparing theimplementation of the electronic system with its specification will notreveal such functional failure. However, the functional failure willbecome apparent when the electronic system is run in its targetenvironment. While conventional methods for debugging, such as logicanalyzers, can connect to accessible pins to monitor the operation ofthe electronic system within its target environment, these conventionalmethods do so only at a very low level of abstraction. In contrast, theHDL-based hardware debugging system according to the invention supportsanalysis, diagnosis and debugging of functional failures due to mistakesin the functional specification. First, there is no need to reproducethe problem in a testbench because the hardware itself is tested in itstarget environment. The ability to observe the HDL design while it isrunning in its target environment at the targeted speed allows thedesigner to immediately gather information about the electronic systemas well as the environment the system is running in. Second, theinformation gathered is related back to the HDL description, which isthe highest level of abstraction.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware debugging of design errors. Design errors stem frommismatches in the behavior of the HDL description written by thedesigner and the functional specification. Conventionally, such problemsare normally debugged by reproducing the observed error in a testbenchfor a functional simulator. Though functional simulation givesinformation at a very detailed level, creating and enhancing a testbenchto reproduce a functional failure is often a very tedious and difficulttask. In contrast, with HDL-based hardware debugging provided by theinvention, there is no need to reproduce the problem in a simulationmodel. By running the electronic system in the environment where thedesign error becomes apparent, sampling the desired portions of thesystem state, and analyzing the observed behavior which is related backto HDL identifiers, a functional failure can quickly be diagnosed.Having gained an understanding of the operation of the system, thedesigner then can use patching to apply a fix. Then, by re-running thepatched HDL design in the target environment, the designer can checkwhether the problem is fixed. In addition, the HDL-based hardwaredebugger can write out the sampled information in a format suitable fora functional simulator tool (check-pointing) so that the designer canuse their preferred analysis tools. The above-described check-pointingmechanism to forward the sampled information to functional simulationcan additionally be used.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware debugging of tool errors. Tool errors are functionalfailures which happen when, for example, a synthesis tool involved inHDL design process does not transform the HDL description into a correctfabricated design. Such errors manifest themselves as mismatches betweenthe functional specification and the functionality of the fabricateddesign, therefore debug techniques which work on the HDL descriptioncannot be used to debug such errors. However, since HDL-based hardwaredebugging works on the instrumented design which was produced by theerroneous tool, the symptoms are able to be displayed to the designerfor diagnosis.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware timing error analysis. Examples of timing errors inan HDL design are race conditions as well as setup and hold timeviolations in the hardware implementation. One symptom of a timing erroris that some registers do not store the correct, expected values. Thissymptom is easily detected using the method of checking for mismatchesbetween the functional simulation result and the values sampled by theDIC. When the designer examines the values of the circuitry that drivethe erroneous register, the cause for the symptom can be quicklydiagnosed. The impact of signal noise on the behavior of the electronicsystem can also be similarly analyzed and diagnosed.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware fault analysis. Faults stem from manufacturingdefects. When faults show up occasionally in a non-reproducible mannerfor one particular device or for only certain devices out of a batch ofother devices, diagnosis becomes very difficult. The HDL-based hardwaredebugging can be used to diagnose faults, and relate them back to HDLidentifiers to provide leads for the fault analysis. Detection of faultsis identical to the detection of timing errors and is done by checkingfor mismatches between functional simulation results and values sampledby the DIC. The ability to relate sample values to the HDL descriptionis a significant advantage since the designer can quickly identify theproblem. Once the problem is located in the HDL description, thedesigner can trace the problem all the way to the layout level todetermine the physical location of the defect or defects that caused thefault. The designer can then perform very precise design rule checks.The ability to limit the area for the design rule checks to theneighborhood of the defect location greatly reduces the effort. If thefault is caused by a design rule violation, it thus can be quickly foundand fixed. Knowing the context of the fault may also help to improve themanufacturing test program and/or improve the manufacturing yield.

Another exemplary application for the HDL-based hardware debugging isHDL-based critical-path analysis of hardware. To analyze the timing andidentify critical paths in the HDL design, the following is one methodthat can be used. Initially, the HDL design is run at the target speedin the target environment and using some predetermined triggerconditions, some predetermined signals are sampled and the value historyis stored. Then, iteratively, the frequency of one or more clock signalsis step-wise increased, the HDL design is run at the increased clockspeed/speeds while the HDL-based hardware debugger samples the very samesignals under the very same trigger conditions as performed in theinitial operation. For each iteration, the HDL-based hardware debuggerchecks for a mismatch between the current sampling values and theinitial sampling values. If a mismatch is detected, the HDL-basedhardware debugger informs the designer about the mismatch and thedesigner can then analyze the portion of the HDL design in which themismatch occurred. The portion of the HDL design in which the mismatchoccurred is likely to be a part of the critical path of the electronicsystem.

Another exemplary application for the HDL-based hardware debugging isanalysis, diagnosis and debugging of environmental errors. Environmentalfactors such as temperature, pressure, radiation, electromagneticfields, and aging effects may cause transient or permanent failures ofthe electronic system. Sometimes an electronic system works reliably inthe field for years until aging and/or environmental factors causefunctional failures. If parts of the electronic system have beeninstrumented, the invention can be used to diagnose the problem quicklyby looking for mismatches between the function of the electronic systemand sampled data taken from the fabricated design. If the electronicsystem has been instrumented with design patching, the electronic systemmight be patched to restore the proper behavior.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware power analysis. Power analysis of the electronicsystem needs to know about the realistic stimuli and transitions in theelectronic system to come up with an accurate estimation of the powerconsumption. In a hardware power analysis application according to theinvention, the system state of the HDL design running in the targetenvironment at target speed is sampled and stored by the HDL-basedhardware debugger and transformed into the proper format for describingsuch stimuli and transitions which can be processed by tools which arespecialized for power calculations.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware regression testing. For regression testing of changesto the hardware design, the invention can be used as follows. An initialversion of the instrumented HDL design, which itself has been tested andfound correct, is run with some predetermined trigger conditions andsome predetermined signals to be sampled. The sample values and theirhistory are stored as a “golden” reference file. Each HDL design whichincludes a design change is then run again using the same triggerconditions and sampling the same signals at the same events. TheHDL-based hardware debugger then checks for mismatches between thereference file and the current sampling data and issues warnings ifmismatches are detected. Accordingly, the design change that introducedthe mismatched behavior can be quickly isolated and fixed.

Another exemplary application for the HDL-based hardware debugging isHDL-based test bench optimization. The reference file of the hardwareregression testing application can be used as stimuli to create a newtestbench for functional simulation, or optimize an existing testbenchto more closely mimic the behavior of the target environment.

Another exemplary application for the HDL-based hardware debugging isHDL-based hardware device driver debugging. The debugging of aparticular device driver which interacts with the HDL design is similarto hardware/software co-debugging. The designer is thus able to see theeffects of the device driver on the HDL design it interacts withimmediately. In numerous applications of the invention, an electronicsystem shall be debugged after it has initially executed certain setupoperations. Having the electronic system execute the operations forsetup can be slow, tedious, and cumbersome. For example, an operatingsystem may be booted and many other device drivers may be loaded beforea particular device driver and the hardware used by it can be debugged.Now, if the designer has to iterate over the initialization many times,it is advantageous that the system state right after the initializationbe saved and restored before each iteration (e.g., system state database1930 of FIG. 19-2). The restoring will operate to bring the HDL designinto exactly the same post-initialization state.

Another exemplary application for the HDL-based hardware debugging isHDL-based software quality analysis in target hardware. The inventioncan also be used in regression testing and software quality assurance ofthe software that runs on the HDL design. If one or more softwareregression tests fail, the HDL-based hardware debugger can be used toquickly diagnose the failure.

Another exemplary application for the HDL-based hardware debugging isHDL-based embedded systems debugging. Software that runs on an embeddedCPU within the HDL design is able to be debugged by a software debugger.The software debugger can communicate with a HDL-based hardware debuggerthat debugs the hardware of the HDL design.

Still another exemplary application for the HDL-based hardware debuggingis in-field support. A common use of the HDL-based hardware debuggingsystem is to instrument an electronic system and then use the HHD 122 todebug the system. After debugging and fabrication, copies of thefabricated electronic system can be distributed to the designer'scustomers. At this point, the DIC 106 can be used in an in-field mode.In the in-field mode, the DIC 106 is used to diagnose failures thatoccur while the electronic system is being used by customers. The DIC106 still resides in the fabricated electronic system but the DIC'snormal state is disabled. It will be enabled if there is a problem withthe electronic system. In addition, a specially trained servicepersonnel can be sent to the customer's site. The personnel can attachthe instrumented electronic system to a portable host computer whichruns the HHD 122, activate the DIC 106, and debug the HDL design in thecustomer's environment. If the instrumented electronic system has beendesigned with a telecommunications link between the DIC 106 and the HHD122, remote debugging may avoid the need for service personnel to besent to the customer's site.

Yet another exemplary application for the HDL-based hardware debuggingis hardware performance monitoring. Often it is important for a hardwaresystem designer to monitor the performance of a hardware system in orderto understand and optimize the system. This can be done by a softwaresimulation of the system. Unfortunately, this has the drawback that itrequires a model of both the electronic system and of the environment itoperates in. By adding performance monitoring circuitry to the DIC 106of the electronic system, the designer can monitor the performance ofthe fabricated electronic system operating in its target environment andat its target speed. The process of adding the monitoring circuitrybegins with the instrumentor. The instrumentor displays the HDLdescription and enables the designer to add performance monitoringcircuitry which relates to the HDL description. During debugging, thedata from the performance monitoring circuitry is loaded from the DIC106 to the HHD 122 after a specified number of clock cycles or inresponse to some trigger event. The HHD 122 then displays the data forthe designer in the proper format. The circuit performance that can bemonitored by this added circuitry is quite broad; for example, a circuitperformance parameter in which there are events that can be counted—thenumber of times a First-In-First-Out (FIFO) queue overflows, a number ofcache misses, etc. Further, average values, such as average stack depth,can also be monitored by using more complex circuitry.

Yet another exemplary application of the HDL-based hardware debuggingsystem is HDL-based hardware regression testing. An important aspect ofa HDL-based hardware debugging regression testing system is the abilityto execute test scripts in an automatic manner. If, for example, thehardware debugging system 100 is used for regression testing system alloperations involved must have the capability to automatically executepredetermined scripts.

The typical state-of-the-art synthesis, place&route and fabricationtools used for FPGA and PLD design mostly have such scriptioncapability.

With the above described CLI methods, the instrumentor (e.g.,instrumentor 110) has this capability. If the commands are embedded intoa scripting language (for example TCL/Tk) scripts can become verypowerful and flexible software programs. Applying above-described namingschemes for Design Visibility, Design Patching, and/or Design Controland the above described CLI to a HDL-based hardware debugger (e.g.,HDL-based hardware debugger 114) gives scripting capabilities to thelast operation in a HDL regression testing system and enables suchsystem to be run automatically.

A HDL-based hardware debugger regression testing system can be enhancedby using the following technique of iterative sampling. This techniquecan be used to work around limitations in sample depth in the DIC byiteratively sampling fragments of an electronic system's trace andconcatenating them to form one large sample trace:

A script to be executed by a HDL-based hardware debugger (e.g.,HDL-based hardware debugger 114) could repeatedly—either forever oruntil a predetermined condition is met—(1) activate Design Control, forexample by activating one or more break-points and watch-points, (2)start sampling (for example, by notifying RTC 1912), (3) receive sampledata and resolve sample data back to high-level HDL, (4) store theback-annotated sample data for later analysis, (5) define, based on apredetermined condition, whether to iterate again starting with (2) orto stop.

One approach produces a continuous sample trace of the electronic systemby resetting the electronic system and using a temporal trigger logic(e.g., a counter) to determine the start of the sampling. Sampling endswhen the sample memory is filled. For each iteration, that temporaltrigger condition always starts sampling at the point where the previoussampling iteration ended. Subsequent sample data can then beconcatenated to form a non-intermittent sample trace.

Another approach produces an intermittent sample trace of the electronicsystem. Sampling is performed whenever the HDL-based hardware debuggeris ready. Sampling ends when the sample memory is filled. The nextsampling is started once the HDL-based hardware debugger has processedthe current sample data (for example has back-annotated it and storedit).

The hardware debugging system of this invention can be used to diagnoseand debug one or more reconfigurable devices. In this case an additionalapproach for sharing resources of the reconfigurable devices isavailable. This method utilizes the fact that reconfigurable devices canquickly be reconfigured to implement a different design with no or verylow engineering cost can be utilized. This method can, for example, beimplemented by extending the HDL-based hardware debugger 1900.

For the HDL design, two or more differently instrumented HDL designs aregenerated and stored in separate instrumented HDL descriptions. Thiscan, for example, be done by selecting different Design Visibility,Design Patching, and/or Design Control in each run of the instrumentor.For each instrumented HDL description, the corresponding designinstrumentation database is also stored. Each of the two or moreinstrumented HDL descriptions is then processed by synthesis,place&route. The result is multiple instrumented designs which actuallyare the same HDL design but with different DIC due to the differentinstrumentation selections. If the reconfigurable devices are FPGA orPLD devices those instrumented designs are the programming files of theHDL design plus different DIC.

Now, during HDL-based Hardware Debugging, each time when a user requestsan activation of Design Visibility, Design Patching, and/or DesignControl, the HDL-based hardware debugger analysis that activation andputs that particular activation in context to other prior activations(if any). As a result of that analysis the HDL-based hardware debuggereither identified the request as forbidden (since none of theinstrumented designs has DIC to perform execute such activations) orthat the HDL-based hardware debugger has identified at least oneinstrumented design which could execute such activations. Once thesubsequent requests for activations are finished, the HDL-based hardwaredebugger directs a fabrication method for reconfigurable devices toconfigure the device with the instrumented design that was identified tohold such activations. Once the device is configured, the HDL-basedhardware debugger is as before to perform HDL-based Hardware Debugging.

The advantage of such a method is clear. It gives a user the option toinstrument the HDL design in many various settings which all combinedtogether provide significant instrumentation to efficiently diagnose anddebug the HDL design, but could not be implemented at once since thiscould result in DIC that exceeds the limited resources available. Thismethod allows a user to almost instantaneously switch between the manydifferent instrumentations, in very short turn-around time.

Portions of the invention are preferably implemented in software. Suchportions of the invention can also be embodied as computer readable codeon a computer readable medium. The computer readable medium is any datastorage device that can store data which can thereafter be read by acomputer system. Examples of the computer readable medium includeread-only memory, random-access memory, CD-ROMs, magnetic tape, opticaldata storage devices. The computer readable medium can also bedistributed over network-coupled computer systems so that the computerreadable code is stored and executed in a distributed fashion.

The many features and advantages of the present invention are apparentfrom the written description and, thus, it is intended by the appendedclaims to cover all such features and advantages of the invention.Further, since numerous modifications and changes will readily occur tothose skilled in the art, it is not desired to limit the invention tothe exact construction and operation as illustrated and described.Hence, all suitable modifications and equivalents may be resorted to asfalling within the scope of the invention.

1. A computer readable medium storing computer readable code, which whenexecuted by a computer, causes the computer to perform operations forfacilitating debugging of a fabricated integrated circuit, comprising:displaying, on a display device associated with a user, at least aportion of a high level hardware description language (HDL) descriptionof electronic circuitry to be included within the fabricated integratedcircuit; selecting aspects of the electronic circuitry, with respect tothe high level HDL description of the electronic circuitry, to beexamined and/or modified during debugging of the fabricated integratedcircuit; displaying, on the display device, a visual indication of theselections that have been made with respect to the high level HDLdescription of the electronic circuitry; creating a design for designinstrumentation circuitry based on the aspects of the electroniccircuitry determined to be examined and/or modified; and incorporatingthe design for the design instrumentation circuitry into the high levelHDL description or a circuit representation derived from the high levelHDL description of the electronic circuitry so as to facilitatedebugging of the fabricated integrated circuit.
 2. The computer readablemedium as recited in claim 1, wherein selecting the aspects of theelectronic circuitry comprises making selections automatically withoutuser interaction.
 3. The computer readable medium as recited in claim 1,wherein selecting the aspects of the electronic circuitry comprisesmaking selections automatically with an instrumentor.
 4. The computerreadable medium as recited in claim 1, wherein selecting the aspects ofthe electronic circuitry comprises making selections through userinteraction with a command line interface.
 5. The computer readablemedium as recited in claim 1, wherein selecting the aspects of theelectronic circuitry comprises making selections either interactively orin batch mode at various levels of granularity.
 6. The computer readablemedium as recited in claim 1, wherein said displaying of the visualindication of the selections that have been made displays tags with thedisplayed at least a portion of the high level HDL description of theelectronic circuitry.
 7. The computer readable medium as recited inclaim 1, wherein said selecting aspects permits alteration of the designinstrumentation circuitry to tradeoff debugging coverage versus areacost.
 8. The computer readable medium as recited in claim 7, whereinsaid method further comprises: displaying the area cost on the displaydevice during or after said selecting aspects.
 9. The computer readablemedium as recited in claim 7, wherein the area cost is dependent on atarget technology for the electronic circuitry.
 10. The computerreadable medium as recited in claim 7, wherein the area cost is withrespect to one of FPGA slices, PLD logic elements, or ASIC gateequivalents.
 11. A computer readable medium storing computer readablecode, which when executed by a computer, causes the computer to performoperations for facilitating debugging of a fabricated integratedcircuit, comprising: displaying a graphical user interface, thegraphical user interface comprising: (i) a hardware description language(HDL) code pane that displays at least a portion of HDL code thatdescribes an electronic system design; (ii) a design navigation panethat displays a navigable, hierarchical description of the electronicsystem design; selecting one or more aspects of the electronic system,with respect to the HDL code, to be examined and/or modified duringdebugging of the electronic system after fabrication of the electronicsystem; displaying, on a display device, a visual indication of theselections that have been made with respect to the HDL code; creating adesign for design instrumentation circuitry based on the aspects of theelectronic system determined to be examined or modified; incorporatingthe design of the design instrumentation circuitry into the HDL code ora circuit description derived from the HDL code; and, displaying debuginformation with a section of the HDL code, said debugging information aconsequence of operating the electronic system in its target environmentat its target speed.
 12. The computer readable medium as recited inclaim 11, wherein the navigable, hierarchical description is displayedin said design navigation pane in a tree-like structure.
 13. Thecomputer readable medium as recited in claim 11, wherein visualindicators are displayed in said HDL code pane interrelated with the HDLcode.
 14. The computer readable medium as recited in claim 13, whereinthe debugging information indicates the status of at least one of abreak-point and a watch-point.
 15. The computer readable medium asrecited in claim 13, wherein the debugging information indicates thestatus of at least one of design visibility and design patching.
 16. Thecomputer readable medium as recited in claim 13, wherein the visualindicators indicate selections with respect to the HDL code beingdisplayed in said HDL code pane.
 17. The computer readable medium asrecited in claim 16, wherein said graphical user interface furthercomprises: a status pane that displays status information pertaining toat least the selections.
 18. The computer readable medium recited inclaim 17, wherein said graphical user interface further comprises: acommand line interface pane capable of receiving a command inputthereto.
 19. The computer readable medium as recited in claim 18,wherein said status pane and said command line interface share a commonpane.
 20. The computer readable medium as recited in claim 11, whereinsaid graphical user interface further comprises: a status and commandline pane that displays status information pertaining to at least theselections and that of receiving a command input.